diff --git a/auto-imports.d.ts b/auto-imports.d.ts index 8139ac9..24e619c 100644 --- a/auto-imports.d.ts +++ b/auto-imports.d.ts @@ -2,4 +2,5 @@ export {} declare global { const ElMessage: typeof import('element-plus/es')['ElMessage'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] } diff --git a/components.d.ts b/components.d.ts index 3410aed..8c0f53f 100644 --- a/components.d.ts +++ b/components.d.ts @@ -24,6 +24,7 @@ declare module '@vue/runtime-core' { ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] + ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] diff --git a/src/api/manage.js b/src/api/manage.js index 5a97cf7..6691ec5 100644 --- a/src/api/manage.js +++ b/src/api/manage.js @@ -219,6 +219,52 @@ export const addModule = (body,token) => { }) } +/** + * + * 删除子模块 + * @param {number} id 子模块ID + * @param {string} token 访问令牌 + * @returns {Promise>} + * + */ +export const deleteModule = (id,token) => { + return axios({ + url: api +"/project/module/delete?id=" +id , + method: "delete", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + + + + }) +} +/** + * + * 修改子模块 + * @param {number} id 子模块ID + * @param {Object} body 包含子模块更新信息的对象 + * @param {string} token 访问令牌 + * @returns {Promise>} + * + */ +export const editModule = ( body,id,token) => { + return axios({ + url: api +"/project/module/edit?id=" +id , + method: "put", + headers: { + 'Authorization': 'Bearer ' + token, + 'Timestamp': getCurrentTimestamp() + }, + data:body + + + + }) +} + + diff --git a/src/views/personal/project/detail/manage.vue b/src/views/personal/project/detail/manage.vue index 389bbd1..035ea54 100644 --- a/src/views/personal/project/detail/manage.vue +++ b/src/views/personal/project/detail/manage.vue @@ -2,8 +2,6 @@
- - @@ -11,48 +9,51 @@ -
{{ item.label }}
+
{{ item.label }}
-
{{ - item.value - }}
- - - - +
+ + +
+
-
- 编辑 - 删除 - + + {{ editMode ? '保存' : '编辑' }} + + 删除
- - +
+