mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 20:23:46 +08:00
fix(ui): 用户管理有效期传参调整,权限标识补充
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { getList, save, deleting, setStatus } from "./api";
|
||||
import { ref } from "vue";
|
||||
import ApiKeyForm from "./ApiKeyForm.vue";
|
||||
import useCustomFormPopup from "@/composables/useCustomFormPopup";
|
||||
import { Message } from "@arco-design/web-vue";
|
||||
@@ -55,17 +54,6 @@ const columns = [
|
||||
},
|
||||
];
|
||||
|
||||
// 数据
|
||||
const tableData = ref([]);
|
||||
const getData = () => {
|
||||
getList().then(({ code, data }) => {
|
||||
if (code === 0) {
|
||||
tableData.value = data;
|
||||
}
|
||||
});
|
||||
};
|
||||
getData();
|
||||
|
||||
// 新增编辑
|
||||
const popup = useCustomFormPopup(ApiKeyForm, save, {
|
||||
popupProps: (arg) => ({ title: arg[0].record ? "编辑ApiKey" : "新增ApiKey" }),
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, defineExpose, defineProps } from "vue";
|
||||
import { dateFormat } from "@chatgpt-plus/packages/utils";
|
||||
import { getModel, getRole } from "./api";
|
||||
const props = defineProps({
|
||||
data: {},
|
||||
@@ -87,9 +88,9 @@ const form = ref({
|
||||
});
|
||||
if (props.data?.id) {
|
||||
form.value = Object.assign({}, props.data);
|
||||
if (form.value.expired_time === 0) {
|
||||
form.value.expired_time = "";
|
||||
}
|
||||
form.value.expired_time = !form.value.expired_time
|
||||
? undefined
|
||||
: dateFormat(form.value.expired_time);
|
||||
}
|
||||
|
||||
//拿选项
|
||||
|
||||
Reference in New Issue
Block a user