|
@@ -136,7 +136,7 @@
|
|
|
>
|
|
|
修改登录密码
|
|
|
</el-button>
|
|
|
- <!-- <el-button
|
|
|
+ <el-button
|
|
|
v-if="scope.row.status === '0'"
|
|
|
link
|
|
|
type="danger"
|
|
@@ -151,7 +151,7 @@
|
|
|
@click="handleActions(scope.row.id, 'enable')"
|
|
|
>
|
|
|
启用
|
|
|
- </el-button> -->
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -183,7 +183,6 @@ import EditPassword from './EditPassword.vue'
|
|
|
defineOptions({ name: 'EnterpriseUserBind' })
|
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
-const { t } = useI18n() // 国际化
|
|
|
const enterpriseList = ref([])
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
@@ -271,14 +270,15 @@ const handleExport = async () => {
|
|
|
}
|
|
|
|
|
|
// 禁用、启用账户
|
|
|
-// const handleActions = async (id: number, type: string) => {
|
|
|
-// try {
|
|
|
-// type === 'disabled' ? await EnterpriseUserBindApi.disabledEnterpriseAccount([id]) : await EnterpriseUserBindApi.enableEnterpriseAccount([id])
|
|
|
-// message.success('操作成功')
|
|
|
-// // 刷新列表
|
|
|
-// await getList()
|
|
|
-// } catch {}
|
|
|
-// }
|
|
|
+const handleActions = async (id: number, type: string) => {
|
|
|
+ try {
|
|
|
+ await message.confirm(type === 'disabled' ? '确定要禁用该账户吗?' : '确定要启用该账户吗?')
|
|
|
+ type === 'disabled' ? await EnterpriseUserBindApi.disabledEnterpriseAccount(id) : await EnterpriseUserBindApi.enableEnterpriseAccount([id])
|
|
|
+ message.success('操作成功')
|
|
|
+ // 刷新列表
|
|
|
+ await getList()
|
|
|
+ } catch {}
|
|
|
+}
|
|
|
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|