diff --git a/src/api/question.js b/src/api/question.js
index 4af1e91..26e318b 100644
--- a/src/api/question.js
+++ b/src/api/question.js
@@ -9,3 +9,24 @@ export const useGetTypeList = (encoding) =>
export const useAddTypeName = (typeName, encoding, userId) =>
requset.post('question/add_typeName', { typeName, encoding, userId })
+
+export const useDeleteTypeName = (typeId) =>
+ requset.get('question/delete_type', {
+ params: {
+ typeId: typeId
+ }
+ })
+
+export const useChangeTypeName = (typeId, typeName, userId) =>
+ requset.post('question/change_type', {
+ typeId,
+ typeName,
+ userId
+ })
+
+export const useGetQuestionList = (encoding) =>
+ requset.get('question/get_questionList', {
+ params: {
+ encoding: encoding
+ }
+ })
diff --git a/src/views/question/QuestionManager.vue b/src/views/question/QuestionManager.vue
index 6b1afa6..17c4388 100644
--- a/src/views/question/QuestionManager.vue
+++ b/src/views/question/QuestionManager.vue
@@ -1,5 +1,20 @@
@@ -9,14 +24,16 @@ import { Edit, Delete } from '@element-plus/icons-vue'
-
-
-
+
+
+
+
+
+ 更多
diff --git a/src/views/question/QuestionTypePage.vue b/src/views/question/QuestionTypePage.vue
index 497ad1c..caefb49 100644
--- a/src/views/question/QuestionTypePage.vue
+++ b/src/views/question/QuestionTypePage.vue
@@ -6,6 +6,8 @@ import { useCompanyStore } from '@/stores'
import { ref } from 'vue'
import QuestionTypeEdit from './components/QuestionTypeEdit.vue'
+import QuestionDialog from './components/QuestionDialog.vue'
+
const questionTypeList = ref([])
const loading = ref(false)
const companyStore = useCompanyStore()
@@ -22,8 +24,9 @@ const handleEdit = (row) => {
dialog.value.open(row)
}
+const deleteDialog = ref()
const handleDelete = (row) => {
- console.log(row)
+ deleteDialog.value.openDialog(row)
}
const onAddEdit = () => {
@@ -44,7 +47,7 @@ const onAddEdit = () => {
style="width: 100%"
>
-
+
@@ -73,5 +76,9 @@ const onAddEdit = () => {
@getQuestionTypeList="getQuestionTypeList"
ref="dialog"
>
+
diff --git a/src/views/question/components/QuestionDialog.vue b/src/views/question/components/QuestionDialog.vue
new file mode 100644
index 0000000..3a60666
--- /dev/null
+++ b/src/views/question/components/QuestionDialog.vue
@@ -0,0 +1,56 @@
+
+
+
+
+ 您确定要删除题库{{ info.typeName }}以及该题库的所有题目?
+
+
+
+
+
+
+
diff --git a/src/views/question/components/QuestionTypeEdit.vue b/src/views/question/components/QuestionTypeEdit.vue
index 6d4699b..2d82f42 100644
--- a/src/views/question/components/QuestionTypeEdit.vue
+++ b/src/views/question/components/QuestionTypeEdit.vue
@@ -1,7 +1,7 @@
-
+