页面按钮权限
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<view v-for="(item, index) in listData" :key="item.TempDetailId || index" class="card-item audit-card"
|
||||
@click="handleItemClick(item)">
|
||||
<!-- 勾选框 -->
|
||||
<view class="check-circle" :class="{ 'check-circle--checked': isSelected(item) }"
|
||||
<view v-if="canEdit" class="check-circle" :class="{ 'check-circle--checked': isSelected(item) }"
|
||||
@click.stop="toggleSelect(item)">
|
||||
<u-icon v-if="isSelected(item)" name="checkmark" :size="24" color="#fff" />
|
||||
</view>
|
||||
@@ -82,7 +82,7 @@
|
||||
</scroll-view>
|
||||
|
||||
<!-- 底部批量操作栏 -->
|
||||
<view class="audit-bar">
|
||||
<view v-if="canEdit" class="audit-bar">
|
||||
<view class="audit-bar__all" @click="handleToggleAll">
|
||||
<view class="check-circle" :class="{ 'check-circle--checked': isAllSelected }">
|
||||
<u-icon v-if="isAllSelected" name="checkmark" :size="24" color="#fff" />
|
||||
@@ -117,7 +117,8 @@
|
||||
storeToRefs
|
||||
} from 'pinia'
|
||||
import {
|
||||
useUserStore
|
||||
useUserStore,
|
||||
useMenuStore
|
||||
} from '@/store'
|
||||
import {
|
||||
reqProjectWorkArea
|
||||
@@ -129,10 +130,12 @@
|
||||
} from '@/api/hj.js'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const menuStore = useMenuStore()
|
||||
const {
|
||||
currentProject,
|
||||
userInfo
|
||||
userInfo,
|
||||
currentProject
|
||||
} = storeToRefs(userStore)
|
||||
const canEdit = computed(() => menuStore.canEditFunc('dailyAudit'))
|
||||
|
||||
// ===== 筛选条件 =====
|
||||
const pipelineCode = ref('')
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-btns">
|
||||
<view v-if="canEdit" class="bottom-btns">
|
||||
<u-button class="btn-delete" size="medium" type="error" @click="handleDelete">删除</u-button>
|
||||
<u-button class="btn-audit" size="medium" type="primary" @click="handleAudit">审核通过</u-button>
|
||||
</view>
|
||||
@@ -134,13 +134,15 @@
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref
|
||||
ref,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
useUserStore
|
||||
useUserStore,
|
||||
useMenuStore
|
||||
} from '@/store'
|
||||
import {
|
||||
reqPendingWeldingDailyDetail,
|
||||
@@ -149,9 +151,11 @@
|
||||
} from '@/api/hj.js'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const menuStore = useMenuStore()
|
||||
const {
|
||||
userInfo
|
||||
} = userStore
|
||||
const canEdit = computed(() => menuStore.canEditFunc('dailyAudit'))
|
||||
|
||||
const tempDetailId = ref('')
|
||||
const form = ref({})
|
||||
|
||||
@@ -155,9 +155,9 @@
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-btns">
|
||||
<u-button v-if="!form.WeldingDate" class="btn-submit" size="medium" type="primary"
|
||||
<u-button v-if="canEdit && !form.WeldingDate" class="btn-submit" size="medium" type="primary"
|
||||
@click="handleReport">填报</u-button>
|
||||
<u-button v-if="form.WeldingDailyId" class="btn-point" size="medium" type="primary"
|
||||
<u-button v-if="canEdit && form.WeldingDailyId" class="btn-point" size="medium" type="primary"
|
||||
@click="handlePoint">点口</u-button>
|
||||
<u-button class="btn-cancel" size="medium" @click="handleClose">取消</u-button>
|
||||
</view>
|
||||
@@ -173,15 +173,17 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { reqGetWeldJointByWeldJointId, reqSaveWeldingDailyByWeldJointId, reqGetManualPointSave, reqFitupCheckByWeldJointId } from '@/api/hj.js'
|
||||
import { reqWeldingLocation } from '@/api/base.js'
|
||||
import { useUserStore } from '@/store'
|
||||
import { useUserStore, useMenuStore } from '@/store'
|
||||
|
||||
|
||||
const userStore = useUserStore()
|
||||
const menuStore = useMenuStore()
|
||||
const { userInfo } = userStore
|
||||
const canEdit = computed(() => menuStore.canEditFunc('dailyPaper'))
|
||||
|
||||
// ===== 表单数据 =====
|
||||
const form = ref({})
|
||||
@@ -252,6 +254,10 @@ const handlePoint = async () => {
|
||||
}
|
||||
|
||||
const handleReport = () => {
|
||||
if (!canEdit.value) {
|
||||
uni.showToast({ title: '当前岗位仅可查看', icon: 'none' })
|
||||
return
|
||||
}
|
||||
uni.showModal({
|
||||
title: '信息提示',
|
||||
content: '确定要填报吗?',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: '确定提交吗?',
|
||||
|
||||
@@ -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: '确定提交吗?',
|
||||
|
||||
Reference in New Issue
Block a user