From dacf3c6ae5ede1c0a8a8b4afb24e2a3b62f0e368 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 21 十一月 2023 15:39:28 +0800
Subject: [PATCH] Merge branch 'wulong' of http://116.62.18.175:6699/r/~yxh/smartor-web into yxh01
---
src/views/patient/patient/index.vue | 247 ++++++++++++++++++++++---------------------------
1 files changed, 110 insertions(+), 137 deletions(-)
diff --git a/src/views/patient/patient/index.vue b/src/views/patient/patient/index.vue
index 936ad34..a90e1da 100644
--- a/src/views/patient/patient/index.vue
+++ b/src/views/patient/patient/index.vue
@@ -261,15 +261,14 @@
<!-- 娣诲姞鎴栦慨鏀圭敤鎴烽厤缃璇濇 -->
<el-dialog
- :title="title"
+ :title="amendtag ? '淇敼鎮h�呬俊鎭�' : '鏂板鎮h��'"
:visible.sync="Labelchange"
width="900px"
- append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
- <el-form-item label="濮撳悕" prop="nickName">
+ <el-form-item label="濮撳悕" prop="name">
<el-input
v-model="form.name"
placeholder="璇疯緭鍏ュ鍚�"
@@ -278,7 +277,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="鎬у埆" prop="deptId">
+ <el-form-item label="鎬у埆" prop="sex">
<el-select v-model="form.sex" placeholder="璇烽�夋嫨鎬у埆">
<el-option
v-for="dict in dict.type.sys_user_sex"
@@ -292,7 +291,7 @@
</el-row>
<el-row>
<el-col :span="12">
- <el-form-item label="璇佷欢绫诲瀷" prop="phonenumber">
+ <el-form-item label="璇佷欢绫诲瀷" prop="iccardtype">
<el-select v-model="form.iccardtype" placeholder="璇烽�夋嫨鎬у埆">
<el-option
v-for="item in paperstypes"
@@ -304,7 +303,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="璇佷欢鍙�" prop="email">
+ <el-form-item label="璇佷欢鍙�" prop="iccardno">
<el-input
v-model="form.iccardno"
placeholder="璇疯緭鍏ヨ瘉浠跺彿"
@@ -315,7 +314,7 @@
</el-row>
<el-row>
<el-col :span="12">
- <el-form-item label="鏈汉鎵嬫満鍙�" prop="userName">
+ <el-form-item label="鏈汉鎵嬫満鍙�" prop="telcode">
<el-input
v-model="form.telcode"
placeholder="璇疯緭鍏ユ墜鏈哄彿"
@@ -324,7 +323,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="浜插睘鎵嬫満鍙�" prop="password">
+ <el-form-item label="浜插睘鎵嬫満鍙�" prop="relativetelcode">
<el-input
v-model="form.relativetelcode"
placeholder="璇疯緭鍏ヤ翰灞炴墜鏈哄彿"
@@ -337,7 +336,7 @@
</el-row>
<el-row>
<el-col :span="12">
- <el-form-item label="骞撮緞" prop="nickName">
+ <el-form-item label="骞撮緞" prop="age">
<el-input
v-model="form.age"
placeholder="璇疯緭鍏ュ勾榫�"
@@ -471,30 +470,30 @@
</template>
<script>
+import { delUser } from "@/api/system/user";
import {
- delUser,
- addUser,
- updateUser,
- resetUserPwd,
- changeUserStatus,
- deptTreeSelect,
-} from "@/api/system/user";
+ listpat_archive,
+ getpat_archive,
+ addpat_archive,
+ updatepat_archive,
+ delpat_archive,
+} from "@/api/smartorpor/pat_archive";
import {
- listpatient,
messagelistpatient,
alterpatient,
addpatient,
+ particularpatient,
deletepatient,
Exporterrorpatient,
+ toleadpatient,
} from "@/api/patient/homepage";
import { listtag } from "@/api/system/label";
-
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
- name: "User",
+ name: "Userhuanze",
dicts: ["sys_normal_disable", "sys_user_sex"],
components: { Treeselect },
data() {
@@ -583,49 +582,49 @@
},
// 琛ㄥ崟鏍¢獙
rules: {
- userName: [
- { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
- {
- min: 2,
- max: 20,
- message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
- trigger: "blur",
- },
- ],
- nickName: [
- { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
- ],
- password: [
- { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
- {
- min: 5,
- max: 20,
- message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
- trigger: "blur",
- },
- ],
- email: [
- {
- type: "email",
- message: "璇疯緭鍏ユ纭殑閭鍦板潃",
- trigger: ["blur", "change"],
- },
- ],
- phonenumber: [
- {
- pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
- message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
- trigger: "blur",
- },
- ],
- IDnumber: [
- {
- pattern:
- /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
- message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
- trigger: "blur",
- },
- ],
+ // userName: [
+ // { required: true, message: "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
+ // {
+ // min: 2,
+ // max: 20,
+ // message: "鐢ㄦ埛鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
+ // trigger: "blur",
+ // },
+ // ],
+ // nickName: [
+ // { required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" },
+ // ],
+ // password: [
+ // { required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" },
+ // {
+ // min: 5,
+ // max: 20,
+ // message: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
+ // trigger: "blur",
+ // },
+ // ],
+ // email: [
+ // {
+ // type: "email",
+ // message: "璇疯緭鍏ユ纭殑閭鍦板潃",
+ // trigger: ["blur", "change"],
+ // },
+ // ],
+ // phonenumber: [
+ // {
+ // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+ // message: "璇疯緭鍏ユ纭殑鎵嬫満鍙风爜",
+ // trigger: "blur",
+ // },
+ // ],
+ // IDnumber: [
+ // {
+ // pattern:
+ // /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
+ // message: "璇疯緭鍏ユ纭殑韬唤璇佸彿鐮�",
+ // trigger: "blur",
+ // },
+ // ],
},
};
},
@@ -638,10 +637,6 @@
created() {
this.getList();
this.gettabList();
- this.getDeptTree();
- this.getConfigKey("sys.user.initPassword").then((response) => {
- this.initPassword = response.msg;
- });
},
methods: {
/** 鏌ヨ鎮h�呭垪琛� */
@@ -657,7 +652,7 @@
/** 鏌ヨ鏍囩鍒楄〃 */
gettabList() {
const queryParams = {};
- listtag(this.addDateRange(queryParams)).then((response) => {
+ listtag().then((response) => {
console.log(response);
this.optionstag = response.rows;
});
@@ -671,12 +666,7 @@
this.loading = false;
});
},
- /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
- getDeptTree() {
- deptTreeSelect().then((response) => {
- this.deptOptions = response.data;
- });
- },
+
// 绛涢�夎妭鐐�
filterNode(value, data) {
if (!value) return true;
@@ -687,35 +677,25 @@
this.queryParams.deptId = data.id;
this.handleQuery();
},
- // 鐢ㄦ埛鐘舵�佷慨鏀�
- handleStatusChange(row) {
- let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
- this.$modal
- .confirm('纭瑕�"' + text + '""' + row.userName + '"鐢ㄦ埛鍚楋紵')
- .then(function () {
- return changeUserStatus(row.userId, row.status);
- })
- .then(() => {
- this.$modal.msgSuccess(text + "鎴愬姛");
- })
- .catch(function () {
- row.status = row.status === "0" ? "1" : "0";
- });
- },
+
// 鍙栨秷鎸夐挳
cancel() {
- this.open = false;
+ this.Labelchange = false;
this.reset();
},
// 琛ㄥ崟閲嶇疆
reset() {
this.form = {
- isupload: "",
- tagname: "",
- tagcategoryid: "",
- tagdescription: "",
+ name: "",
+ age: "",
+ sex: "",
+ tagList: [],
+ iccardno: "",
+ telcode: "",
+ iccardtype: "",
+ relativetelcode: "",
};
- this.resetForm("form");
+ // this.resetForm("form");
},
/** 鎼滅储鎸夐挳鎿嶄綔 */
handleQuery() {
@@ -740,60 +720,53 @@
handleAdd() {
this.reset();
this.Labelchange = true;
+ this.amendtag = false;
},
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
- this.Labelchange = true;
- this.reset();
- },
- /** 閲嶇疆瀵嗙爜鎸夐挳鎿嶄綔 */
- handleResetPwd(row) {
- this.$prompt('璇疯緭鍏�"' + row.userName + '"鐨勬柊瀵嗙爜', "鎻愮ず", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- closeOnClickModal: false,
- inputPattern: /^.{5,20}$/,
- inputErrorMessage: "鐢ㄦ埛瀵嗙爜闀垮害蹇呴』浠嬩簬 5 鍜� 20 涔嬮棿",
- })
- .then(({ value }) => {
- resetUserPwd(row.userId, value).then((response) => {
- this.$modal.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
- });
- })
- .catch(() => {});
- },
- /** 鍒嗛厤瑙掕壊鎿嶄綔 */
- handleAuthRole: function (row) {
- const userId = row.userId;
- this.$router.push("/system/user-auth/role/" + userId);
- },
- /** 鎻愪氦鎸夐挳 */
- submitForm: function () {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.userId != undefined) {
- updateUser(this.form).then((response) => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addUser(this.form).then((response) => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
- }
- }
+ console.log(row);
+ const userIds = row.patid || this.ids;
+ particularpatient(userIds).then((response) => {
+ console.log(response);
+ this.form = response.data;
});
+ this.amendtag = true;
+ this.Labelchange = true;
},
+
+ //淇敼/鏂板鎮h��
+ submitForm() {
+ if (this.amendtag) {
+ alterpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ });
+ } else {
+ addpatient(this.form)
+ .then((response) => {
+ console.log(response);
+ })
+ .then(() => {
+ this.getList();
+ this.$modal.msgSuccess("娣诲姞鎴愬姛");
+ });
+ }
+ this.reset();
+ // this.idds = "";
+ this.Labelchange = false;
+ },
+
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const userIds = row.userId || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鐢ㄦ埛缂栧彿涓�"' + userIds + '"鐨勬暟鎹」锛�')
.then(function () {
- return delUser(userIds);
+ return deletepatient(userIds);
})
.then(() => {
this.getList();
--
Gitblit v1.9.3