页面按钮权限
This commit is contained in:
@@ -168,7 +168,7 @@
|
||||
|
||||
|
||||
|
||||
<nbd-submit-bar text="提交" :loading="submitting" @click="handleSubmit" />
|
||||
<nbd-submit-bar v-if="canEdit" text="提交" :loading="submitting" @click="handleSubmit" />
|
||||
</view>
|
||||
|
||||
<nbd-select v-model="showPaintCodePicker" title="选择防腐等级" :list="paintCodeList" label-key="PaintCode" value-key="Id"
|
||||
@@ -176,11 +176,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { watch, nextTick } from 'vue'
|
||||
import { useUserStore } from '@/store'
|
||||
import { useUserStore, useMenuStore } from '@/store'
|
||||
import { reqMaterialInfoByMaterialCode, reqPaintCodeList, reqSaveAntiCorrosionCheck, reqGetAntiCorrosionCheck } from '@/api/hj.js'
|
||||
|
||||
// 防腐记录字段
|
||||
@@ -202,7 +202,9 @@ const antiFields = [
|
||||
const antiList = ref([])
|
||||
|
||||
const userStore = useUserStore()
|
||||
const menuStore = useMenuStore()
|
||||
const { userInfo, currentProject } = storeToRefs(userStore)
|
||||
const canEdit = computed(() => menuStore.canEditFunc('antiRust'))
|
||||
const form = ref({})
|
||||
const showPaintCodePicker = ref(false)
|
||||
const paintCodeList = ref([])
|
||||
@@ -307,6 +309,10 @@ const loadData = async (id) => {
|
||||
|
||||
// 提交
|
||||
const handleSubmit = async () => {
|
||||
if (!canEdit.value) {
|
||||
uni.showToast({ title: '当前岗位仅可查看', icon: 'none' })
|
||||
return
|
||||
}
|
||||
if (!antiForm.value.PaintId) {
|
||||
uni.showToast({ title: '请选择防腐等级', icon: 'none' })
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user