页面按钮权限

This commit is contained in:
huhao
2026-08-11 11:30:27 +08:00
parent d1d3636cf1
commit 94ec5e65ca
8 changed files with 148 additions and 59 deletions
+9 -3
View File
@@ -160,7 +160,7 @@
</block>
<!-- 提交按钮 -->
<view class="submit-bar">
<view v-if="canEdit" class="submit-bar">
<view class="btn-primary-gradient" @click="handleSubmit">
<text class="btn-primary-gradient__text">提交结果</text>
</view>
@@ -172,10 +172,10 @@
</template>
<script setup>
import { ref, watch, nextTick } from 'vue'
import { ref, watch, nextTick, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { storeToRefs } from 'pinia'
import { useUserStore } from '@/store'
import { useUserStore, useMenuStore } from '@/store'
import { reqPreWeldJointByWeldJointId, reqSaveFitupCheck, reqCuttingCheckByWeldJointId, reqFitupCheckByWeldJointId } from '@/api/hj'
import { reqGetGrooveTypeList } from '@/api/base'
@@ -209,7 +209,9 @@ const cuttingList = ref([])
const fitupList = ref([])
const userStore = useUserStore()
const menuStore = useMenuStore()
const { userInfo, currentProject } = storeToRefs(userStore)
const canEdit = computed(() => menuStore.canEditFunc('makeRight'))
const info = ref({})
const remark = ref('')
@@ -256,6 +258,10 @@ const handleMutualCheck = () => {
uni.navigateTo({ url: '/scanpages/hj/material_sampling?id=' + id.value })
}
const handleSubmit = () => {
if (!canEdit.value) {
uni.showToast({ title: '当前岗位仅可查看', icon: 'none' })
return
}
uni.showModal({
title: '确认提交',
content: '确定提交吗?',