Parcourir la source

零号变更按钮修改

duy il y a 8 mois
Parent
commit
4a4784536c
1 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 9 1
      src/views/alter/admin/zero.vue

+ 9 - 1
src/views/alter/admin/zero.vue

@@ -25,7 +25,7 @@
                         <div class="text-orange font-400">零号变更数据列表</div>
                     </template>
                     <template #extra>
-                        <el-button hc-btn type="primary" @click="buildZeroChange">
+                        <el-button hc-btn type="primary" :disabled="isBuildZeroChange" @click="buildZeroChange">
                             <hc-icon name="pencil-ruler-2" />
                             <span>一键生成零号变更</span>
                         </el-button>
@@ -43,6 +43,7 @@ import { useAppStore } from '~src/store'
 import { getArrValue, getObjValue, getRandom } from 'js-fast-way'
 import unitApi from '~api/project/debit/contract/unit'
 import mainApi from '~api/alter/admin/zero'
+import website from '~src/config'
 
 defineOptions({
     name: 'AlterAdminZero',
@@ -52,10 +53,17 @@ const uuid = getRandom(4)
 const useAppState = useAppStore()
 const projectId = ref(useAppState.getProjectId || '')
 const contractId = ref(useAppState.getContractId || '')
+const isBuildZeroChange = ref(false)
 
 //渲染完成
 onMounted(() => {
     setSplitRef()
+    if (!website.localModel) {
+        isBuildZeroChange.value = false   
+        } else {
+            //甬台温,零号变更按钮禁用
+            isBuildZeroChange.value = true 
+        }
 })
 
 //初始化设置拖动分割线