|
@@ -30,7 +30,9 @@
|
|
|
>
|
|
|
重置
|
|
|
</el-button>
|
|
|
- <el-button type="primary" @click="addHandler"> 新增单位 </el-button>
|
|
|
+ <el-button v-if="!isNotSuper" type="primary" @click="addHandler">
|
|
|
+ 新增单位
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -70,6 +72,7 @@
|
|
|
<el-button
|
|
|
link
|
|
|
type="danger"
|
|
|
+ v-if="!isNotSuper"
|
|
|
@click="delOrganization(row)"
|
|
|
size="small"
|
|
|
>
|
|
@@ -94,7 +97,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { onActivated, ref, watch } from "vue";
|
|
|
+import { onActivated, ref, watch, computed } from "vue";
|
|
|
import {
|
|
|
getOrgListFetch,
|
|
|
addOrgFetch,
|
|
@@ -106,6 +109,7 @@ import type { OrganizationType } from "@/request/organization";
|
|
|
import { OrganizationTypeDesc } from "@/store/organization";
|
|
|
import { organizationAdd, organizationEdit } from "./quisk";
|
|
|
import { debounce } from "@/util";
|
|
|
+import { user } from "@/store/user";
|
|
|
import { ElMessageBox } from "element-plus";
|
|
|
import { openLoading, closeLoading } from "@/helper/loading";
|
|
|
|
|
@@ -120,6 +124,14 @@ const pageProps = ref({ ...initProps });
|
|
|
const total = ref<number>(0);
|
|
|
const relicsArray = ref<any[]>([]);
|
|
|
|
|
|
+const isNotSuper = computed(
|
|
|
+ () =>
|
|
|
+ user.value.roles.filter(
|
|
|
+ (item) =>
|
|
|
+ item.roleKey === "system_admin" || item.roleKey === "system_common"
|
|
|
+ ).length > 0
|
|
|
+);
|
|
|
+
|
|
|
// 1省级 2市级 3县级 4服务商
|
|
|
|
|
|
const refresh = debounce(async () => {
|