From 2698387e653c6a25059c3ae9976f18b814eba892 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 12 九月 2025 15:16:46 +0800
Subject: [PATCH] 医疗权限
---
src/views/project/organization/index.vue | 192 ++++++++++++++++++++++++++++-------------------
1 files changed, 115 insertions(+), 77 deletions(-)
diff --git a/src/views/project/organization/index.vue b/src/views/project/organization/index.vue
index 2a106a7..7cb588f 100644
--- a/src/views/project/organization/index.vue
+++ b/src/views/project/organization/index.vue
@@ -31,7 +31,7 @@
/>
</el-select>
</el-form-item>
- <el-form-item label="鎵�鍦ㄥ湴鍖�" prop="regionallevel">
+ <el-form-item label="鎵�鍦ㄥ湴鍖�" prop="regionallevel">
<el-select
v-model="queryParams.regionallevel"
placeholder="璇烽�夋嫨鎵�鍦ㄥ湴鍖�"
@@ -45,7 +45,7 @@
:value="dict.value"
/>
</el-select>
- </el-form-item>
+ </el-form-item>
<el-form-item>
<el-button
type="primary"
@@ -146,19 +146,15 @@
align="left"
prop="registeraddress"
/>
+ <!--
<el-table-column label="鑱旂郴浜�" align="left" prop="contactperson" />
<el-table-column label="鑱旂郴鐢佃瘽" align="left" prop="contactnumber" />
- <el-table-column
- label="娉ㄥ唽鏃堕棿"
- align="left"
- prop="registertime"
- width="180"
- >
+ <el-table-column label="娉ㄥ唽鏃堕棿" align="left" prop="registertime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.registertime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
-
+-->
<el-table-column
label="鎿嶄綔"
align="left"
@@ -201,15 +197,19 @@
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row style="overflow: hidden">
- <el-col :span="8">
- <el-form-item label="缁勭粐缂栧彿" prop="organizationid">
- <el-input
- v-model="form.organizationid"
- placeholder="璇疯緭鍏ョ粍缁囩紪鍙�"
- />
+ <el-col :span="5">
+ <el-form-item label="鎵�灞炲湴鍖�" prop="regionallevel">
+ <el-select v-model="form.regionallevel" placeholder="璇烽�夋嫨鍦板尯">
+ <el-option
+ v-for="dict in dict.type.sys_RegionalLevel"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ ></el-option>
+ </el-select>
</el-form-item>
</el-col>
- <el-col :span="16">
+ <el-col :span="10">
<el-form-item label="缁勭粐鍚嶇О" prop="organizationname">
<el-input
v-model="form.organizationname"
@@ -217,9 +217,18 @@
/>
</el-form-item>
</el-col>
+ <el-col :span="7">
+ <el-form-item label="缁勭粐缂栧彿" prop="organizationid">
+ <el-input
+ v-model="form.organizationid"
+ :disabled="true"
+ placeholder="璇疯緭鍏ョ粍缁囩紪鍙�"
+ />
+ </el-form-item>
+ </el-col>
</el-row>
- <el-row
- ><el-col :span="8">
+ <el-row>
+ <el-col :span="5">
<el-form-item label="鏈烘瀯绫诲瀷" prop="organizationtype">
<el-select
v-model="form.organizationtype"
@@ -234,7 +243,7 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="5">
<el-form-item label="鍖婚櫌鎬ц川" prop="hospitalnature">
<el-select
v-model="form.hospitalnature"
@@ -249,20 +258,15 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="8">
- <el-form-item
- label="鍖荤枟鏈烘瀯缂栧彿"
- prop="medicalcode"
- >
+ <el-col :span="5">
+ <el-form-item label="鍖婚櫌缂栫爜" prop="medicalcode">
<el-input
v-model="form.medicalcode"
placeholder="璇疯緭鍏ュ尰鐤楁満鏋勭紪鍙�"
/>
</el-form-item>
</el-col>
- </el-row>
- <el-row
- ><el-col :span="8">
+ <el-col :span="7">
<el-form-item label="娉ㄥ唽鏃堕棿" prop="registertime">
<el-date-picker
clearable
@@ -275,7 +279,17 @@
</el-date-picker>
</el-form-item>
</el-col>
- <el-col :span="8">
+ </el-row>
+ <el-row>
+ <el-col :span="10">
+ <el-form-item label="娉ㄥ唽鍦板潃" prop="registeraddress">
+ <el-input
+ v-model="form.registeraddress"
+ placeholder="璇疯緭鍏ユ敞鍐屽湴鐐硅缁嗗湴鍧�"
+ />
+ </el-form-item>
+ </el-col>
+ <el-col :span="5">
<el-form-item label="鑱旂郴浜�" prop="contactperson">
<el-input
v-model="form.contactperson"
@@ -283,7 +297,7 @@
/>
</el-form-item>
</el-col>
- <el-col :span="8">
+ <el-col :span="7">
<el-form-item label="鑱旂郴鐢佃瘽" prop="contactnumber">
<el-input
v-model="form.contactnumber"
@@ -292,31 +306,21 @@
</el-form-item>
</el-col>
</el-row>
-
<el-row>
- <el-col :span="8">
- <el-form-item label="鎵�灞炲湴鍖�" prop="regionallevel">
- <el-select v-model="form.regionallevel" placeholder="璇烽�夋嫨鍦板尯">
- <el-option
- v-for="dict in dict.type.sys_RegionalLevel"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
+ <el-col :span="10">
+ <el-form-item label="閾惰鍚嶇О" prop="bankname">
+ <el-input v-model="form.bankname" placeholder="璇疯緭鍏ラ摱琛屽悕绉�" />
</el-form-item>
</el-col>
-
- <el-col :span="16">
- <el-form-item label="鏈烘瀯鍦板潃" prop="registeraddress">
+ <el-col :span="10">
+ <el-form-item label="閾惰璐﹀彿" prop="bankaccount">
<el-input
- v-model="form.registeraddress"
- placeholder="璇疯緭鍏ユ敞鍐屽湴鐐硅缁嗗湴鍧�"
+ v-model="form.bankaccount"
+ placeholder="璇疯緭鍏ラ摱琛岃处鍙�"
/>
</el-form-item>
</el-col>
</el-row>
-
<el-row>
<el-form-item label="浠嬬粛" prop="introduction">
<el-input
@@ -327,7 +331,6 @@
/>
</el-form-item>
</el-row>
-
<el-row>
<el-col :span="24">
<el-form-item label="logo鍥剧墖璺緞">
@@ -351,7 +354,7 @@
delOrganization,
addOrganization,
updateOrganization,
- exportOrganization,
+ exportOrganization
} from "@/api/project/organization";
export default {
@@ -385,19 +388,24 @@
pageSize: 10,
organizationname: null,
organizationtype: null,
- province: null,
+ province: null
},
+ initregionallevel: "",
+ inithospitalnature: "",
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
rules: {
organizationname: [
- { required: true, message: "缁勭粐鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
+ { required: true, message: "缁勭粐鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
],
- organizationid: [
- { required: true, message: "缁勭粐缂栧彿涓嶈兘涓虹┖", trigger: "blur" },
+ hospitalnature: [
+ { required: true, message: "鍖婚櫌鎬ц川涓嶈兘涓虹┖", trigger: "blur" },
],
- },
+ regionallevel: [
+ { required: true, message: "鎵�灞炲湴甯備笉鑳戒负绌�", trigger: "blur" }
+ ]
+ }
};
},
created() {
@@ -408,7 +416,7 @@
/** 鏌ヨ鏈烘瀯绠$悊鍒楄〃 */
getList() {
this.loading = true;
- listOrganization(this.queryParams).then((response) => {
+ listOrganization(this.queryParams).then(response => {
this.organizationList = response.rows;
this.total = response.total;
this.loading = false;
@@ -451,7 +459,7 @@
community: null,
communityname: null,
countycode: null,
- countyname: null,
+ countyname: null
};
this.resetForm("form");
},
@@ -467,7 +475,7 @@
},
// 澶氶�夋閫変腑鏁版嵁
handleSelectionChange(selection) {
- this.ids = selection.map((item) => item.id);
+ this.ids = selection.map(item => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -481,7 +489,9 @@
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
- getOrganization(id).then((response) => {
+ getOrganization(id).then(response => {
+ this.initregionallevel = response.data.regionallevel;
+ this.inithospitalnature = response.data.hospitalnature;
this.form = response.data;
this.open = true;
this.title = "淇敼鏈烘瀯绠$悊";
@@ -489,30 +499,58 @@
},
/** 鎻愪氦鎸夐挳 */
submitForm() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- updateOrganization(this.form).then((response) => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addOrganization(this.form).then((response) => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
+ if (
+ this.initregionallevel == this.form.regionallevel &&
+ this.inithospitalnature == this.form.hospitalnature
+ ) {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateOrganization(this.form).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addOrganization(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ }
}
+ });
+ } else {
+ if (this.form.id != null) {
+ this.$modal
+ .confirm("鏈淇敼娑夊強鍏抽敭瀛楁锛屼繚瀛樺皢浼氭洿鏂扮粍缁囩紪鍙锋槸鍚︾户缁紵")
+ .then(()=> {
+ console.log(this.form);
+ return delOrganization(this.form.id);
+ })
+ .then(() => {
+ this.form.id = null;
+ addOrganization(this.form).then(response => {
+ this.$modal.msgSuccess("缂栬緫鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ });
+ } else {
+ addOrganization(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
}
- });
+ }
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('鏄惁纭鍒犻櫎鏈烘瀯绠$悊缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�')
- .then(function () {
+ .then(function() {
return delOrganization(ids);
})
.then(() => {
@@ -530,12 +568,12 @@
this.exportLoading = true;
return exportOrganization(queryParams);
})
- .then((response) => {
+ .then(response => {
this.$download.name(response.msg);
this.exportLoading = false;
})
.catch(() => {});
- },
- },
+ }
+ }
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.3