fix(ui): 用户管理有效期传参调整,权限标识补充

This commit is contained in:
廖彦棋
2024-03-15 09:25:06 +08:00
parent 8476c73b0c
commit b7cc987132
4 changed files with 17 additions and 15 deletions

View File

@@ -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" }),

View File

@@ -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);
}
//拿选项