页面接口推介

This commit is contained in:
仲么了
2023-07-31 09:00:30 +08:00
parent 863d30ee61
commit 77b4ff6f88
30 changed files with 928 additions and 652 deletions

View File

@@ -99,7 +99,12 @@
</template>
<script>
import list from '../../common/js/list'
import { queryTopologyDiagramPage, deleteAppTopologyDiagram, addAppTopologyDiagram } from '../../common/api/project'
import {
queryTopologyDiagramPage,
deleteAppTopologyDiagram,
addAppTopologyDiagram,
deleteProject,
} from '../../common/api/project'
export default {
mixins: [list],
data() {
@@ -178,6 +183,21 @@ export default {
uni.navigateTo({
url: '/pages/project/new?project=' + encodeURIComponent(JSON.stringify(this.project)),
})
} else if (e.item.text == '删除') {
uni.showModal({
title: '提示',
content: '删除项目后不可恢复,是否继续?',
success: (res) => {
if (res.confirm) {
deleteProject(this.project.id).then((res) => {
this.$util.toast('删除成功')
this.$util.refreshPrePage()
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
})
}
},
navMenuClick(index) {
@@ -233,16 +253,20 @@ export default {
iconPath: '/static/share.png',
text: '编辑',
})
this.content.push({
iconPath: '/static/delate.png',
text: '删除',
})
this.content.push({
iconPath: '/static/transfer.png',
text: '移交',
})
this.content.push({
iconPath: '/static/share.png',
text: '分享',
})
if (userInfo.authorities == '3') {
this.content.push({
iconPath: '/static/transfer.png',
text: '移交',
})
} else if (userInfo.authorities == '4') {
this.content.push({
iconPath: '/static/share.png',
text: '分享',
})
}
setTimeout(() => {
// 获取nav高度