页面按钮权限

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
@@ -169,7 +169,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>
@@ -178,10 +178,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, reqSaveCuttingCheck, reqCuttingCheckByWeldJointId, reqGetAntiCorrosionCheck } from '@/api/hj'
@@ -217,7 +217,9 @@ const cuttingList = ref([])
const antiListMap = ref({})
const userStore = useUserStore()
const menuStore = useMenuStore()
const { userInfo, currentProject } = storeToRefs(userStore)
const canEdit = computed(() => menuStore.canEditFunc('sampling'))
const info = ref({})
const remark = ref('')
@@ -259,6 +261,10 @@ watch(() => layingOffForm.value.CheckResult, async (val) => {
})
const handleSubmit = () => {
if (!canEdit.value) {
uni.showToast({ title: '当前岗位仅可查看', icon: 'none' })
return
}
uni.showModal({
title: '确认提交',
content: '确定提交吗?',