页面按钮权限
This commit is contained in:
@@ -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: '确定提交吗?',
|
||||
|
||||
Reference in New Issue
Block a user