瀏覽代碼

管理员账号注销

huangbin 4 年之前
父節點
當前提交
0286f388de

+ 114 - 0
src/views/information/account_info/compoments/cancel-managers/index.vue

@@ -0,0 +1,114 @@
+<template>
+  <!-- 管理员账号注销-->
+  <a-modal class="add-custom custom-detail"
+           title="管理员账号注销"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">注销
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.accountname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { Modal } from 'ant-design-vue';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+
+export default defineComponent({
+    name: 'detail-managers',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('account_info_manager_btn_logout');
+        const loading = ref<boolean>(false);
+        function submit() {
+            Modal.confirm({
+                title: '是否确认注销该账户',
+                okText: '确认注销',
+                cancelText: '取消',
+                onOk() {
+                    // let reqParam: LoginaccountOperateReq = {
+                    //     userid: props.selectedData.userid,
+                    //     loginid: props.selectedData.loginid,
+                    //     operatetype: 7, // 5: 锁定 6:解锁
+                    //     logintaaccounts: [],
+                    // };
+                    // requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+                    //     cancel();
+                    //     context.emit('refresh');
+                    // });
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 81 - 0
src/views/information/account_info/compoments/detail-managers/index.vue

@@ -0,0 +1,81 @@
+<template>
+  <!-- 账号详情-->
+  <a-modal class="add-custom custom-detail"
+           title="账号详情"
+           v-model:visible="visible"
+           centered
+           :maskClosable="maskClosableFlag"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                @click="cancel">关闭</a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="账户权限"
+                       name="userid">
+            <span class="white">{{selectedData.rolename}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="账户名称"
+                       name="logincode">
+            <span class="white">{{selectedData.logincode}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <span class="white">{{selectedData.accountname}}</span>
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="手机号码"
+                       name="mobile">
+            <span class="white">{{selectedData.mobile}}</span>
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+
+export default defineComponent({
+    name: 'detail-managers',
+    components: {},
+    props: {
+        selectedData: {
+            type: Object as PropType<ErmcpLoginUser>,
+            default: {},
+        },
+    },
+    setup() {
+        const { visible, cancel } = closeModal('detail');
+
+        return {
+            visible,
+            cancel,
+            maskClosableFlag: false,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.custom-detail {
+    .ant-form.inlineForm {
+        margin-top: 20px;
+    }
+}
+</style>;

+ 10 - 2
src/views/information/account_info/list/account_info_manager/index.vue

@@ -59,7 +59,12 @@
     </a-collapse>
     <Add @refresh="handleBtnAction"
          :tableList="tableList" />
-    <Modify />
+    <Modify :tableList="tableList"
+            @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Cancel @refresh="handleBtnAction"
+            :selectedData="moreModelData" />
+    <Detail :selectedData="moreModelData" />
   </div>
 </template>
 
@@ -67,12 +72,13 @@
 import { defineComponent, initData, getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
-import { ref } from 'vue';
 import { getAccountStatus, handleModalData, handleTableList } from '../setup';
 import { queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-managers/index.vue';
 import Modify from '../../compoments/modify-managers/index.vue';
+import Detail from '../../compoments/detail-managers/index.vue';
+import Cancel from '../../compoments/cancel-managers/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
@@ -83,6 +89,8 @@ export default defineComponent({
         filterCustomTable,
         Add,
         Modify,
+        Detail,
+        Cancel,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();