罗斌杰 2 years ago
parent
commit
278d499f26
  1. 12
      src/router/index.js
  2. 1
      src/views/basic-dictionary/CommonCharacters.vue
  3. 8
      src/views/basic-dictionary/FieldComparison.vue
  4. 556
      src/views/basic-dictionary/FieldComparisonInterface.vue
  5. 174
      src/views/basic-dictionary/ThirdPartyInterfaces.vue
  6. 1
      src/views/fee-settings/Item.vue
  7. 421
      src/views/user-list/UserList.vue

12
src/router/index.js

@ -207,10 +207,10 @@ const routes = [{
import ("../views/diagnosis/diagnosis.vue"),
},
{
path: "/third-party-interfaces",
name: '第三方接口',
path: "/field-comparison-interface",
name: '字段对照接口',
component: () =>
import ("../views/basic-dictionary/ThirdPartyInterfaces.vue"),
import ("../views/basic-dictionary/FieldComparisonInterface.vue"),
},
{
path: "/field-comparison",
@ -218,6 +218,12 @@ const routes = [{
component: () =>
import ("../views/basic-dictionary/FieldComparison.vue"),
},
{
path: "/third-party-interfaces",
name: '第三方接口',
component: () =>
import ("../views/basic-dictionary/ThirdPartyInterfaces.vue"),
},
//---------------------- 收费设置 start ----------------------
{
path: "/invoice-item-type",

1
src/views/basic-dictionary/CommonCharacters.vue

@ -390,6 +390,7 @@ export default {
this.tableData = res.data;
}
});
this.curRow=this.$options.data().curRow
},
cancellation() {
this.$message.info("取消操作");

8
src/views/basic-dictionary/FieldComparison.vue

@ -457,6 +457,11 @@ export default {
this.filetelists = [...res.data];
}
});
this.$nextTick(()=>{
this.$refs["dataList"].setCurrentRow("");
})
this.curRow=this.$options.data().curRow
this.curRows=this.$options.data().curRows
},
rowick(row) {
this.curRow = { ...row };
@ -591,9 +596,6 @@ export default {
:deep .el-table tr {
height: 33px;
}
:deep .el-table th.el-table__cell>.cell{
text-align: left;
}
:deep .selectCls .popper__arrow{
top: -37px !important;
}

556
src/views/basic-dictionary/FieldComparisonInterface.vue

@ -0,0 +1,556 @@
<template>
<div class="box">
<div style="position: relative">
<div class="middlebox">
<div class="contenttitle">
常用设置 /
<span class="contenttitleBold">字段对照接口</span>
</div>
<!-- <div class="seachinput">
<el-select
v-model="department"
placeholder="请搜索"
filterable
:filter-method="remoteMethodes"
default-first-option
@change="quckDepartments"
clearable
size="small"
>
<el-option
v-for="item in quckDepartment"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
</div> -->
</div>
<div style="display: block; margin-top: 7px; margin-right: 110px">
<div style="background-color: #fff; padding: 15px; border-radius: 8px">
<div id="printTest">
<el-table
:data="tableData"
row-key="id"
class="el-table__body-wrapper tbody"
@row-click="rowick"
highlight-current-row
:height="window.pageHeight < 600 ? 480 : window.pageHeight - 130"
ref="tableData"
tooltip-effect="light"
>
<el-table-column prop="id" label="编号" width="300">
</el-table-column>
<el-table-column prop="displayName" label="名称" width="">
</el-table-column>
<el-table-column prop="parmValue" label="配置参数" width="" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="creatorName" label="创建者" width="">
</el-table-column>
<el-table-column prop="lastModifierName" label="修改者" width="">
</el-table-column>
<!-- <el-table-column prop="simpleCode" label="简称" width="180">
</el-table-column> -->
<el-table-column prop="creationTime" label="创建时间" width="200">
<template slot-scope="scope">
{{ scope.row.creationTime | dateFormat }}
</template>
</el-table-column>
<el-table-column
prop="lastModificationTime"
label="修改时间"
width="200"
>
<template slot-scope="scope">
{{ scope.row.lastModificationTime | dateFormat }}
</template>
</el-table-column>
<el-table-column label="操作" width="" align="center">
<template>
<el-tag
class="move"
style="
cursor: move;
background-color: rgb(245, 245, 245);
border: none;
"
draggable="true"
>
<i
class="el-icon-d-caret"
style="
width: 1rem;
height: 1rem;
color: rgb(113, 113, 113);
"
></i>
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<!-- 按钮区域 -->
<div
style="
margin-left: 10px;
margin-top: 3%;
position: absolute;
top: 0;
right: 0;
"
>
<el-button type="" @click="add" class="commonbutton">新增</el-button>
<div style="margin-top: 10px">
<el-button type="" @click="edlits" class="commonbutton"
>编辑</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="deleteid" class="deleteButton"
>删除</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="topping" class="commonbutton"
>置顶</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="toppings" class="commonbutton"
>置底</el-button
>
</div>
<div style="margin-top: 10px">
<el-button
type=""
:disabled="isshow"
@click="assertion"
class="commonbutton"
>排序</el-button
>
</div>
<div style="margin-top: 10px">
<el-button
type=""
:disabled="isshow"
@click="cancellation"
class="commonbutton"
>取消</el-button
>
</div>
</div>
<!-- <div class="cancelorconfirm"></div> -->
<!-- 新增或者编辑弹框 -->
<el-dialog
:title="title == 1 ? '新增' : '修改'"
:visible.sync="dialogVisible"
width="90%"
:close-on-click-modal="false"
fullscreen
>
<el-form ref="form" :model="form" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="编号">
<el-input
v-model="form.id"
style="width: 65%"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="名称">
<el-input
ref="refinput"
v-model="form.displayName"
style="width: 65%"
size="small"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="配置参数">
<!-- <el-input
v-model="form.parmValue"
size="small"
></el-input> -->
<el-input
type="textarea"
v-model="form.parmValue"
:autosize="{ minRows: 23, maxRows: 23 }"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-divider></el-divider>
<el-col :span="4" style="margin-left: 15px">
<el-form-item label="创建者">
<el-input
v-model="form.creatorName"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建时间">
<el-input
:value="form.creationTime | dateFormat"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="修改者">
<el-input
v-model="form.lastModifierName"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="修改时间">
<el-input
style="width: 85%"
:value="form.lastModificationTime | dateFormat"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false" class="difference"
> </el-button
>
<el-button type="primary" @click="addoredit" class="commonbutton"
> </el-button
>
</span>
</el-dialog>
</div>
</div>
</template>
<script>
import Sortable from "sortablejs";
import { mapState } from "vuex";
import {
examinationlist,
newphysical,
listsid,
Modifiers,
deletecol,
medicaltopbottom,
examinationdragging,
} from "../../request/systemapi";
import { postapi, putapi } from "@/api/api";
export default {
data() {
return {
isshow: true,
dialogVisible: false,
title: 1,
form: {
displayName: "",
parmValue: "",
},
tableData: [],
initTableData: [],
curRow: {},
department: "",
quckDepartment: [],
};
},
created() {
this.getlist();
},
mounted() {
this.rowDrop();
},
computed: {
...mapState(["window"]),
},
methods: {
//id
rowick(row) {
this.curRow = { ...row };
// listsid(row.id).then((res) => {
// if(res.code!=-1){
// this.curRow = { ...res.data };
// }
// // this.form = res.data;
// });
},
remoteMethodes(keyWords) {
if (keyWords) {
this.quckDepartment = [];
this.initTableData.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) >
-1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
this.quckDepartment.push(item);
}
});
} else {
this.quckDepartment = [...this.initTableData];
}
},
quckDepartments(e) {
if (e) {
this.tableData.forEach((item, index) => {
if (e == item.id) {
this.$refs["tableData"].setCurrentRow(item);
this.rowick(item);
this.searchup(item, index);
}
});
} else {
this.remoteMethodes();
}
},
searchup(data, index) {
// if (index > 3) {
const targetTop = this.$refs["tableData"].$el
.querySelectorAll(".el-table__body tr")
[index - 1].getBoundingClientRect().top;
const containerTop = this.$refs["tableData"].$el
.querySelector(".el-table__body")
.getBoundingClientRect().top;
const scrollParent = this.$refs["tableData"].$el.querySelector(
".el-table__body-wrapper"
);
scrollParent.scrollTop = targetTop - containerTop;
// }
},
cancellation() {
this.$message.info("取消操作");
this.isshow = true;
this.getlist();
},
//
assertion() {
const result = [];
this.tableData.forEach((item, index) => {
// index 0 displayOrder
// const currentDisplayOrder = this.tableData.length -1
// const currentDisplayOrder = this.initTableData[index].displayOrder;
// if (item.displayOrder != currentDisplayOrder) {
// displayOrder
result.push({ id: item.id, displayOrder: index + 1 });
// }
});
postapi("/api/app/ColumnReference/UpdateSortMany",{ itemList: result }).then((res) => {
if (res.code != -1) {
this.getlist();
this.isshow = true;
this.$message.success("操作成功");
}
});
},
//
rowDrop() {
this.$nextTick(() => {
const tbody = document.querySelector(".el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
handle: ".move",
animation: 300,
//
// draggable: ".module-manager .el-table__row",
onChoose({ oldIndex }) {
_this.$refs["tableData"].setCurrentRow(_this.tableData[oldIndex]);
_this.rowick(_this.tableData[oldIndex]);
},
onEnd({ newIndex, oldIndex }) {
// console.log(arr);
_this.isshow = false;
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
_this.tableData.map((item, index) => {
if (index == newIndex && index == oldIndex) {
// console.log(item, "");
} else if (index == oldIndex) {
} else if (index == newIndex) {
}
});
},
});
});
},
//
topping() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
postapi(`/api/app/ColumnReference/UpdateManySort?id=${this.form.id}&SortType=1`).then((res) => {
if (res.code != -1) {
this.getlist();
this.$message.success("操作成功");
}
});
}
},
toppings() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
postapi(`/api/app/ColumnReference/UpdateManySort?id=${this.form.id}&SortType=2`).then((res) => {
if (res.code != -1) {
this.getlist();
this.$message.success("操作成功");
}
});
}
},
//
deleteid(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择删除的数据");
} else {
this.$confirm("是否确认删除,是否继续", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
cancelButtonClass: "difference",
confirmButtonClass: "commonbutton",
})
.then(() => {
postapi(`/api/app/ColumnReference/Delete/?id=${this.form.id}`).then((res) => {
if (res.code != -1) {
this.curRow = this.$options.data().curRow;
this.getlist();
this.$message.success("删除成功");
}
});
})
.catch(() => {});
// deletecol(this.form.id).then((res) => {
// console.log("");
// this.getlist();
// });
}
},
//edlits
edlits(row) {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
this.title = 2;
this.dialogVisible = true;
postapi(`/api/app/ColumnReference/Get/?id=${this.form.id}`).then((res) => {
if (res.code != -1) {
this.form = res.data;
}
});
}
},
//
addoredit() {
if (this.form.displayName == undefined || this.form.displayName == "") {
this.$message.warning("请输入名称");
} else {
if (this.title == 1) {
postapi("/api/app/ColumnReference/Create", {
displayName: this.form.displayName,
parmValue: this.form.parmValue,
}).then((res) => {
if (res.code != -1) {
this.getlist();
this.dialogVisible = false;
this.$message.success("新增成功");
}
});
} else if (this.title == 2) {
postapi("/api/app/ColumnReference/Update", {
id: this.form.id,
displayName: this.form.displayName,
parmValue: this.form.parmValue,
}).then((res) => {
if (res.code != -1) {
this.getlist();
this.dialogVisible = false;
this.$message.success("修改成功");
}
});
}
}
},
//
add() {
this.dialogVisible = true;
this.title = 1;
this.form = this.$options.data().form;
this.$nextTick(() => {
this.$refs.refinput.focus();
});
},
//
getlist() {
postapi("/api/app/ColumnReference/GetList").then((res) => {
if (res.code != -1) {
this.initTableData = [...res.data];
this.tableData = res.data;
// this.quckDepartment=[...res.data.items]
}
});
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_button.css";
@import "../../assets/css/global_dialog.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
.box {
display: flex;
flex-direction: column;
}
:deep .el-form-item {
margin-bottom: 14px;
}
/* el-dialog的头部样式 */
:deep .el-dialog__header {
padding: 11px 20px 11px;
}
/* el-dialog的主体样式 */
:deep .el-dialog__body {
padding: 0px 20px 0px;
}
/* el-divider样式 */
:deep .el-divider--horizontal {
margin: 0px 0 12px;
}
/* el-dialog的底部样式 */
:deep .el-dialog__footer {
padding: 0px 20px 14px;
}
.seachinput {
width: 250px;
margin-right: 110px;
}
:deep .seachinput .el-select {
width: 100%;
}
</style>

174
src/views/basic-dictionary/ThirdPartyInterfaces.vue

@ -44,7 +44,49 @@
</el-table-column>
<el-table-column prop="displayName" label="名称" width="">
</el-table-column>
<el-table-column prop="parmValue" label="配置参数" width="" show-overflow-tooltip>
<el-table-column
prop="parmValue"
label="配置参数"
width=""
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="medicalCenterId" label="体检中心">
<template slot-scope="scope">
<div>
{{
getTreeName(
medicalCenter,
scope.row.medicalCenterId
)
}}
</div>
</template>
</el-table-column>
<el-table-column
prop="thirdInterfaceType"
label="接口类型"
width=""
>
<template slot-scope="scope">
<div>
{{
scope.row.thirdInterfaceType == "01"
? "LIS申请"
: "收费申请"
}}
</div>
</template>
</el-table-column>
<el-table-column prop="isActive" label="启用" width="">
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.isActive"
true-label="Y"
false-label="N"
disabled
></el-checkbox>
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建者" width="">
</el-table-column>
@ -154,26 +196,67 @@
>
<el-form ref="form" :model="form" label-width="80px">
<el-row>
<el-col :span="12">
<el-col :span="6">
<el-form-item label="编号">
<el-input
v-model="form.id"
style="width: 65%"
style="width: 100%"
disabled
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="6">
<el-form-item label="名称">
<el-input
ref="refinput"
v-model="form.displayName"
style="width: 65%"
style="width: 100%"
size="small"
></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="体检中心">
<el-cascader
v-model="form.medicalCenterId"
:options="medicalCenter"
ref="example"
popper-class="example"
@change="ischangs"
:props="{
value: 'id',
label: 'displayName',
children: 'treeChildren',
checkStrictly: true,
expandTrigger: 'hover',
}"
size="small"
>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="接口类型">
<el-select
v-model="form.thirdInterfaceType"
placeholder="请选择接口类型"
size="small"
>
<el-option label="LIS申请" value="01" />
<el-option label="收费申请" value="02" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="启用">
<el-checkbox
v-model="form.isActive"
true-label="Y"
false-label="N"
></el-checkbox>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
@ -244,7 +327,7 @@
</div>
</template>
<script>
import Sortable from "sortablejs";
import Sortable, { get } from "sortablejs";
import { mapState } from "vuex";
import {
examinationlist,
@ -255,7 +338,7 @@ import {
medicaltopbottom,
examinationdragging,
} from "../../request/systemapi";
import { postapi, putapi } from "@/api/api";
import { getapi, postapi, putapi } from "@/api/api";
export default {
data() {
return {
@ -265,15 +348,20 @@ export default {
form: {
displayName: "",
parmValue: "",
thirdInterfaceType: "",
medicalCenterId: "",
isActive: "Y",
},
tableData: [],
initTableData: [],
curRow: {},
department: "",
quckDepartment: [],
medicalCenter: [],
};
},
created() {
this.getmedicalCenter();
this.getlist();
},
mounted() {
@ -283,6 +371,26 @@ export default {
...mapState(["window"]),
},
methods: {
getTreeName(list, id) {
for (let i = 0; i < list.length; i++) {
if (list[i].id === id) {
return list[i].displayName;
} else if (list[i].treeChildren && list[i].treeChildren.length > 0) {
let res = this.getTreeName(list[i].treeChildren, id);
if (res) {
return res;
}
}
}
},
ischangs(v) {
if (v.length > 1) {
this.form.medicalCenterId = this.form.medicalCenterId.slice(-1)[0];
} else {
this.form.medicalCenterId = this.form.medicalCenterId[0];
}
this.$refs.example.toggleDropDownVisible();
},
//id
rowick(row) {
this.curRow = { ...row };
@ -354,7 +462,9 @@ export default {
result.push({ id: item.id, displayOrder: index + 1 });
// }
});
postapi("/api/app/ColumnReference/UpdateSortMany",{ itemList: result }).then((res) => {
putapi("/api/app/ThirdInterface/UpdateSortMany", {
itemList: result,
}).then((res) => {
if (res.code != -1) {
this.getlist();
this.isshow = true;
@ -398,7 +508,9 @@ export default {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
postapi(`/api/app/ColumnReference/UpdateManySort?id=${this.form.id}&SortType=1`).then((res) => {
putapi(
`/api/app/ThirdInterface/UpdateManySort?id=${this.form.id}&SortType=1`
).then((res) => {
if (res.code != -1) {
this.getlist();
this.$message.success("操作成功");
@ -411,7 +523,9 @@ export default {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
postapi(`/api/app/ColumnReference/UpdateManySort?id=${this.form.id}&SortType=2`).then((res) => {
putapi(
`/api/app/ThirdInterface/UpdateManySort?id=${this.form.id}&SortType=2`
).then((res) => {
if (res.code != -1) {
this.getlist();
this.$message.success("操作成功");
@ -433,7 +547,9 @@ export default {
confirmButtonClass: "commonbutton",
})
.then(() => {
postapi(`/api/app/ColumnReference/Delete/?id=${this.form.id}`).then((res) => {
postapi("/api/app/ThirdInterface/Delete", {
id: this.curRow.id,
}).then((res) => {
if (res.code != -1) {
this.curRow = this.$options.data().curRow;
this.getlist();
@ -456,22 +572,30 @@ export default {
} else {
this.title = 2;
this.dialogVisible = true;
postapi(`/api/app/ColumnReference/Get/?id=${this.form.id}`).then((res) => {
if (res.code != -1) {
this.form = res.data;
}
});
}
},
//
addoredit() {
if (this.form.displayName == undefined || this.form.displayName == "") {
this.$message.warning("请输入名称");
} else if (
this.form.medicalCenterId == undefined ||
this.form.medicalCenterId == ""
) {
this.$message.warning("请选择体检中心");
} else if (
this.form.thirdInterfaceType == undefined ||
this.form.thirdInterfaceType == ""
) {
this.$message.warning("请选择接口类型");
} else {
if (this.title == 1) {
postapi("/api/app/ColumnReference/Create", {
postapi("/api/app/ThirdInterface/Create", {
displayName: this.form.displayName,
parmValue: this.form.parmValue,
thirdInterfaceType: this.form.thirdInterfaceType,
medicalCenterId: this.form.medicalCenterId,
isActive: this.form.isActive,
}).then((res) => {
if (res.code != -1) {
this.getlist();
@ -480,10 +604,13 @@ export default {
}
});
} else if (this.title == 2) {
postapi("/api/app/ColumnReference/Update", {
postapi("/api/app/ThirdInterface/Update", {
id: this.form.id,
displayName: this.form.displayName,
parmValue: this.form.parmValue,
thirdInterfaceType: this.form.thirdInterfaceType,
medicalCenterId: this.form.medicalCenterId,
isActive: this.form.isActive,
}).then((res) => {
if (res.code != -1) {
this.getlist();
@ -504,8 +631,13 @@ export default {
});
},
//
getmedicalCenter() {
getapi("/api/app/organization-units/by-code-all").then((res) => {
this.medicalCenter = [...res.data];
});
},
getlist() {
postapi("/api/app/ColumnReference/GetList").then((res) => {
postapi("/api/app/ThirdInterface/GetList").then((res) => {
if (res.code != -1) {
this.initTableData = [...res.data];
this.tableData = res.data;
@ -553,4 +685,8 @@ export default {
:deep .seachinput .el-select {
width: 100%;
}
:deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: #409eff !important;
border-color: #409eff !important;
}
</style>

1
src/views/fee-settings/Item.vue

@ -1932,6 +1932,7 @@ export default {
}
// this.getlist();
});
this.curRow=this.$options.data().curRow
},
typeid() {
projectlist().then((res) => {

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

@ -29,11 +29,13 @@
</div>
<div>
<div style="display: flex; margin-top: 7px">
<div :style="
<div
:style="
'width: 208px;overflow: scroll;height:' +
(window.pageHeight < 600 ? 480 : window.pageHeight - 100) +
'px;background-color: #fff; border-radius: 8px'
">
"
>
<div style="margin-top: 10px">
<el-tree
:data="treedata"
@ -54,10 +56,9 @@
v-if="!data.parentId"
/>
</span>
<span
:class="!data.parentId ? 'maxtitle' : 'mintitle'"
>{{ node.label }}</span
>
<span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{
node.label
}}</span>
</div>
</span>
</el-tree>
@ -65,11 +66,13 @@
</div>
<div style="display: block">
<div style="margin-left: 15px; display: flex">
<div :style="
<div
:style="
'width:' +
(window.pageWidth - 200 - 110 - 50 - 14) +
'px;padding: 15px;background-color: #fff;border-radius: 8px;'
">
"
>
<el-table
:data="tableData"
row-key="id"
@ -79,14 +82,24 @@
class="el-table__body-wrapper tbody"
highlight-current-row
@row-click="rowick"
ref="tableData">
<el-table-column type="index" label="序号" min-width="50" align="center"></el-table-column>
ref="tableData"
>
<el-table-column
type="index"
label="序号"
min-width="50"
align="center"
></el-table-column>
<el-table-column prop="userName" label="账号" min-width="100">
</el-table-column>
<el-table-column prop="email" label="邮箱" min-width="150">
</el-table-column>
<!-- <el-table-column prop="email" label="所属角色" width=""> </el-table-column> -->
<el-table-column prop="phoneNumber" label="手机号" min-width="130">
<el-table-column
prop="phoneNumber"
label="手机号"
min-width="130"
>
</el-table-column>
<el-table-column prop="surname" label="姓名" min-width="100">
</el-table-column>
@ -152,15 +165,6 @@
</div>
</div>
<!-- <el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:page-sizes="[2, 10, 20, 30]"
:page-size="5"
layout="total, sizes, prev, pager, next, jumper"
:total="total - 1"
>
</el-pagination> -->
<!-- 编辑 -->
<el-dialog
:title="title == 1 ? '新增用户' : '修改用户'"
@ -172,7 +176,7 @@
v-model="activeName"
v-if="title == 2 ? true : false"
@tab-click="handleClick"
style="height:400px;"
style="height: 400px"
>
<el-tab-pane label="用户信息" name="first">
<el-form
@ -180,16 +184,22 @@
ref="form"
:model="form"
label-width="80px"
:rules="rules"
:rules="ruless"
>
<el-row>
<el-col :span="12">
<el-form-item label="姓名" prop="surname">
<el-input v-model="form.surname" size="small" /> </el-form-item
<el-input
v-model="form.surname"
size="small"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="用户名" prop="userName">
<el-input v-model="form.userName" size="small" /> </el-form-item
<el-input
v-model="form.userName"
size="small"
/> </el-form-item
></el-col>
<!-- <el-col :span="12">
@ -199,7 +209,9 @@
<el-col :span="12">
<el-form-item label="手机号" prop="phoneNumber">
<el-input
v-model="form.phoneNumber" size="small" /> </el-form-item
v-model="form.phoneNumber"
size="small"
/> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="科室">
@ -211,7 +223,8 @@
<el-cascader
v-model="orgId"
:options="organizationalstructure"
:show-all-levels="false"
ref="example"
popper-class="example"
@change="cascaderchang"
:props="{
expandTrigger: 'hover',
@ -219,7 +232,10 @@
children: 'treeChildren',
checkStrictly: true,
value: 'id',
}" size="small" style="width:260px;" />
}"
size="small"
style="width: 100%"
/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
@ -228,7 +244,11 @@
></el-col> -->
<el-col>
<el-form-item label="是否激活">
<el-checkbox v-model="form.isActive"></el-checkbox>
<el-checkbox
v-model="form.isActive"
true-label="true"
false-label="false"
></el-checkbox>
</el-form-item>
</el-col>
<el-col :span="12">
@ -239,24 +259,6 @@
>
<el-input v-model="form.password"></el-input> </el-form-item
></el-col>
<!-- <el-col :span="12">
<el-form-item label="所属角色" prop="roleNames">
<el-select
v-model="form.roleNames"
placeholder="请选择"
@change="onchang"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
</el-form>
</el-tab-pane>
@ -273,39 +275,25 @@
</el-checkbox>
</el-checkbox-group>
</el-tab-pane>
<!-- <el-tab-pane label="组织架构"> -->
<!-- :default-checked-keys="defaultKeys" -->
<!-- <el-tree
<el-tab-pane label="科室操作权限">
<div style="overflow-y: scroll; height: 350px">
<el-tree
:props="{
label: 'displayName',
children: 'treeChildren',
}"
:default-checked-keys="defaultKeys"
:default-checked-keys="department"
:default-expand-all="true"
show-checkbox
:data="organizationalstructure"
:data="setupdepartments"
node-key="id"
@check="iscrentd"
ref="trees"
>
</el-tree> -->
<!-- <div>
当前选中的组织<span> {{ orgIds }}</span>
@check="iscrentddepartment"
ref="department"
size="small"
/>
</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-tab-pane> -->
<el-tab-pane label="科室操作权限">
</el-tab-pane>
<!-- <el-tab-pane label="项目类别权限">
<div style="overflow-y: scroll;height:350px;">
<el-tree
:props="{
@ -320,7 +308,7 @@
@check="iscrentddepartment"
ref="department" size="small" />
</div>
</el-tab-pane>
</el-tab-pane> -->
</el-tabs>
<!-- // -->
<el-form
@ -331,16 +319,22 @@
label-width="80px"
:rules="rules"
>
<el-tabs style="height:400px;">
<el-tabs style="height: 400px">
<el-tab-pane label="用户信息">
<el-row>
<el-col :span="12">
<el-form-item label="姓名" prop="surname">
<el-input v-model="form.surname" size="small"></el-input> </el-form-item
<el-input
v-model="form.surname"
size="small"
></el-input> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item label="用户名" prop="userName">
<el-input v-model="form.userName" size="small"></el-input> </el-form-item
<el-input
v-model="form.userName"
size="small"
></el-input> </el-form-item
></el-col>
<!-- <el-col :span="12">
<el-form-item label="名称" prop="userName">
@ -377,29 +371,12 @@
size="small"
></el-input> </el-form-item
></el-col>
<!-- <el-col :span="12">
<el-form-item label="所属角色" prop="roleNames">
<el-select
v-model="form.roleNames"
placeholder="请选择"
@change="onchang"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="是否激活">
<el-checkbox
v-model="form.isActive"
:checked="true"
true-label="true"
false-label="false"
></el-checkbox>
</el-form-item>
</el-col>
@ -444,7 +421,7 @@
</el-tree> -->
</el-tab-pane>
<el-tab-pane label="科室操作权限">
<div style="overflow-y: scroll;height:350px;">
<div style="overflow-y: scroll; height: 350px">
<el-tree
:data="newdepartment"
show-checkbox
@ -463,7 +440,7 @@
</el-tabs>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false" class="difference"> </el-button>
<el-button @click="cancellation" class="difference"> </el-button>
<el-button type="primary" @click="addlsit" class="commonbutton"
> </el-button
>
@ -532,7 +509,9 @@
</el-option>
</el-select>
<span slot="footer" class="dialog-footer">
<el-button @click="useerdialogVisible = false" class="difference"> </el-button>
<el-button @click="useerdialogVisible = false" class="difference"
> </el-button
>
<el-button type="primary" @click="Identifyusers" class="commonbutton"
> </el-button
>
@ -547,16 +526,28 @@
>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="新密码">
<el-input v-model="newPassWord" max="16" min="6" size="small"></el-input>
<el-input
v-model="newPassWord"
max="16"
min="6"
size="small"
></el-input>
</el-form-item>
</el-form>
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="确认密码">
<el-input v-model="confarmPassWord" max="16" min="6" size="small"></el-input>
<el-input
v-model="confarmPassWord"
max="16"
min="6"
size="small"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="editpassworddialogVisible = false" class="difference"
<el-button
@click="editpassworddialogVisible = false"
class="difference"
> </el-button
>
<el-button type="primary" @click="Changepassword" class="commonbutton"
@ -600,7 +591,6 @@ import { getapi, postapi } from "@/api/api";
import { tcdate, deepCopy, objCopy } from "../../utlis/proFunc";
import MenuPageSet from "../../components/menuPage/MenuPageSet.vue";
// let validatePassword = (rule, value, callback) => {
// var reg1 =
// /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*.])[\da-zA-Z~!@#$%^&*.]{6,}$/; //8
@ -626,7 +616,7 @@ export default {
label: "displayName",
},
orgIds: "",
orgId: [],
orgId: "",
confarmPassWord: "", //
usersName: "", //
department: [], //
@ -650,7 +640,7 @@ export default {
crdetcascader: [], //
dialogParams: {
MenuPageSet:{opra:'role'} //
MenuPageSet: { opra: "role" }, //
},
//
@ -700,21 +690,62 @@ export default {
],
nam: [{ required: true, message: "请输入名", trigger: "change" }],
},
ruless: {
password: [
{
required: true,
trigger: "blur",
message: "密码不能为空",
},
{
min: 6,
max: 15,
message: "长度在 6 到 15 个字符",
trigger: "blur",
},
],
email: [
{
required: true,
message: "请输入邮箱地址",
trigger: "blur",
},
{
type: "email",
message: "请输入正确的邮箱地址",
trigger: ["blur", "change"],
},
],
phoneNumber: [
{ required: true, message: "请输入手机号", trigger: "blur" },
],
userName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
surname: [
{ required: true, message: "请输入用户名称", trigger: "change" },
],
roleNames: [
{ required: true, message: "请选择所属用户", trigger: "change" },
],
nam: [{ required: true, message: "请输入名", trigger: "change" }],
},
tableData: [],
optionsArr: [],
dialogVisible: false,
modetype: "",
total: 0,
form: {
surname: "fas",
name: "ww",
email: "45148415@qq.com",
surname: "",
name: "",
email: "",
surname: "",
phoneNumber: "",
password: "1q2w3E*",
password: "",
roleNames: [],
userName: "",
password: "1q2w3E*",
password: "",
isActive: true,
},
roleNames: [],
@ -723,13 +754,6 @@ export default {
pages: {
SkipCount: 0,
MaxResultCount: 1000,
Filter: "",
// Filter:{
// userName:this.form.userName,
// phoneNumber:this.form.phoneNumber,
// surname: this.form.surname,
// }
},
title: 1,
rowid: "",
@ -742,7 +766,7 @@ export default {
password: "",
passwordid: "",
newdepartment: [], //
curRow:{}
curRow: {},
};
},
computed: {
@ -756,7 +780,20 @@ export default {
},
methods: {
cancellation() {
this.dialogVisible = false;
this.form = this.$options.data().form;
this.roleNames = this.$options.data().roleNames;
this.department = this.$options.data().department;
this.orgId = this.$options.data().orgId;
},
cascaderchang(v) {
if (v.length > 1) {
this.orgId = this.orgId.slice(-1)[0];
} else {
this.orgId = this.orgId[0];
}
this.$refs.example.toggleDropDownVisible();
},
gettreedata() {
getapi("/api/app/organization-units/by-code-all").then((res) => {
@ -799,7 +836,7 @@ export default {
}).then((res) => {
if (res.code != -1) {
this.editpassworddialogVisible = false;
this.$message.success('修改成功')
this.$message.success("修改成功");
}
});
}
@ -819,11 +856,11 @@ export default {
if (this.curRow.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
this.dialogParams.MenuPageSet.opra = 'user'
this.dataTransOpts.tableS.adp_users.id = this.curRow.id
this.dialogWin.MenuPageSet = true
this.dialogParams.MenuPageSet.opra = "user";
this.dataTransOpts.tableS.adp_users.id = this.curRow.id;
this.dialogWin.MenuPageSet = true;
setTimeout(() => {
this.dataTransOpts.refresh.role_menu_info.M++
this.dataTransOpts.refresh.role_menu_info.M++;
}, 20);
}
},
@ -867,11 +904,11 @@ export default {
// // usreslist()
// },
btnQuery() {
getapi("/api/identity/users/getlist").then(res =>{
getapi("/api/identity/users/getlist", this.pages).then((res) => {
if (res.code != -1) {
this.tableData = res.data.items
this.tableData = res.data.items;
}
})
});
},
onchang(v) {
@ -950,23 +987,23 @@ export default {
if (res.code != -1) {
this.btnQuery();
this.useerdialogVisible = false;
this.$message.success('绑定成功')
this.$message.success("绑定成功");
}
});
} else {
this.$message.warning('请选择用户')
this.$message.warning("请选择用户");
}
},
//
binduser() {
if (this.values.length == 0) {
this.$message.warning('请选中')
this.$message.warning("请选中");
} else {
userorganizat(this.rowid, this.idkes).then((res) => {
if (res.code != -1) {
this.bindingdialogVisible = false;
this.btnQuery();
this.$message.success('操作成功')
this.$message.success("操作成功");
}
// this.values = [];
// console.log(res);
@ -989,7 +1026,6 @@ export default {
if (res.code != -1) {
this.options = res.data.items;
}
});
organizationtree().then((res) => {
@ -997,7 +1033,7 @@ export default {
this.newachitecture = res.data;
this.newdepartment = res.data;
this.organizationalstructure = res.data;
tcdate(this.organizationalstructure)
tcdate(this.organizationalstructure);
}
});
},
@ -1019,25 +1055,26 @@ export default {
phoneNumber: this.form.phoneNumber,
password: this.form.password,
roleNames: this.roleNames,
isActive: true,
isActive: this.form.isActive,
};
if (this.roleNames.length == 0) {
this.$message.warning('请选择角色')
this.$message.warning("请选择角色");
} else {
newlists(obj).then((res) => {
if (res.code != -1) {
this.dialogVisible = false;
this.$message.success('新增成功')
// selectbinding({orgId:this.nodekes}).then(r=>{
// console.log('')
// })
this.roleNames = [];
this.$message.success("新增成功");
this.form = this.$options.data().form;
this.roleNames = this.$options.data().roleNames;
this.department = this.$options.data().department;
this.curRow = this.$options.data().curRow;
this.orgId = this.$options.data().orgId;
this.$refs["tableData"].setCurrentRow("");
this.btnQuery();
}
});
}
} else if (this.title == 2) {
// this.roleNames=arrs
let obj = {
userName: this.form.userName,
@ -1048,79 +1085,43 @@ export default {
phoneNumber: this.form.phoneNumber,
password: this.form.password,
roleNames: this.form.roleNames,
isActive: true,
isActive: this.form.isActive,
// roleNames: this.form.roleNames,
};
if(this.orgId=="" || this.orgId==null){
return this.$message.warning("请选择科室");
}
if (this.form.roleNames.length == 0) {
this.$message.warning("请选则用户角色");
return
return;
}
let msg=''
let msg = "";
//
postapi(`/api/identity/users/update?id=${this.form.id}`,obj
).then(res => {
if(res.code != -1){ //
return postapi(`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,this.department)
}else{
msg = res.message
postapi(`/api/identity/users/update?id=${this.form.id}`, obj)
.then((res) => {
if (res.code != -1) {
//
postapi(`/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,this.department).then((res)=>{
if(res.code!=-1){
postapi("/api/app/organization-units/user-organization-unit",{ userId: this.form.id, orgId: this.orgId }).then((res)=>{
if(res.code!=-1){
this.dialogVisible = false;
this.form = this.$options.data().form;
this.roleNames = this.$options.data().roleNames;
this.department = this.$options.data().department;
this.curRow = this.$options.data().curRow;
this.orgId = this.$options.data().orgId;
this.$refs["tableData"].setCurrentRow("");
this.$message.success("操作成功!");
this.btnQuery();
}
}).then( res=>{
if(res.code != -1 && this.orgId.length > 0){
return postapi('/api/app/organization-units/user-organization-unit',{ userId: this.form.id, orgId: this.orgId[this.orgId.length - 1]})
}else{
msg = res.message
})
}
})
if(msg){
this.$message.error(msg);
}else{
this.dialogVisible = false;
this.$message.success('操作成功!')
}
//
// console.log(this.form.roleNames);
// // let tempArr=[]
// editmodify(this.form.id, obj).then((res) => {
// if (res.code == 1) {
// console.log("");
// this.dialogVisible = false;
// this.btnQuery();
// }
// console.log(res);
// if (res.code == 1) {
// selectbinding({
// userId: this.form.id,
// orgId: this.orgId[0],
// }).then((res) => {
// console.log(res);
// //api/app/organization-units/user-organization-unit
// postapi(
// `/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,
// this.orgId
// ).then((res) => {
// console.log(this.orgId);
// // console.log("");
// });
// // console.log("");
// });
// // postapi(
// // `/api/app/abpuserdepartment/createmany?UserId=${this.form.id}`,
// // this.department
// // ).then((res) => {
// // // console.log("");
// // });
// console.log("aaaaaa");
// }
// });
// } else {
// console.log("");
// }
})
}
}
});
@ -1141,16 +1142,18 @@ export default {
cancelButtonText: "取消",
type: "warning",
cancelButtonClass: "difference",
confirmButtonClass:"commonbutton"
confirmButtonClass: "commonbutton",
})
.then(() => {
postapi(`/api/identity/users/delete?id=${this.curRow.id}`).then((res) => {
postapi(`/api/identity/users/delete?id=${this.curRow.id}`).then(
(res) => {
if (res.code != -1) {
this.btnQuery();
this.curRow = this.$options.data().curRow;
this.$message.success('删除成功')
this.$message.success("删除成功");
}
});
}
);
})
.catch(() => {});
}
@ -1162,7 +1165,6 @@ export default {
this.$message.warning("请选择操作的数据");
} else {
this.dialogVisible = true;
// this.form.roleNames = row.roleNames;
this.title = 2;
// this.form.roleNames = this.roleNames;
if (this.title == 2) {
@ -1178,7 +1180,7 @@ export default {
organizationtree().then((res) => {
if (res.code != -1) {
this.organizationalstructure = res.data;
tcdate(this.organizationalstructure)
tcdate(this.organizationalstructure);
this.setupdepartments = res.data;
}
});
@ -1199,11 +1201,13 @@ export default {
});
//ID
getapi(`/api/app/organization-units/organization-unit-by-user-id/${this.curRow.id}`).then(res =>{
getapi(
`/api/app/organization-units/organization-unit-by-user-id/${this.curRow.id}`
).then((res) => {
if (res.code != -1 && res.data.length > 0) {
this.orgId = [res.data[0].id]
this.orgId = res.data[0].id;
}
})
});
//
getapi(
@ -1212,6 +1216,7 @@ export default {
// default-checked-keys
if (res.code != -1) {
this.department = res.data;
console.log(this.department);
}
});
}

Loading…
Cancel
Save