iZaiZaiA 2 жил өмнө
parent
commit
7b9182dae9

+ 0 - 8
src/api/modules/other/first-item.js

@@ -10,14 +10,6 @@ export default {
         }, msg);
         }, msg);
     },
     },
     //分页数据
     //分页数据
-    async getPageData(form, msg = true) {
-        return httpApi({
-            url: '/api/blade-business/firstInformation/page',
-            method: 'get',
-            params: form
-        }, msg)
-    },
-    //分页数据
     async getQueryPageData(form, msg = true) {
     async getQueryPageData(form, msg = true) {
         return httpApi({
         return httpApi({
             url: '/api/blade-business/informationWriteQuery/page',
             url: '/api/blade-business/informationWriteQuery/page',

+ 1 - 1
src/global/components/hc-sms-auth/index.vue

@@ -109,7 +109,7 @@ const getCodeClick = async () => {
         window?.$message?.success('发送成功')
         window?.$message?.success('发送成功')
     } else {
     } else {
         resCode.value = ''
         resCode.value = ''
-        window?.$message?.error('发送失败')
+        window?.$message?.error(msg || '请求异常')
     }
     }
 }
 }
 
 

+ 1 - 1
src/views/data-fill/components/WbsTree.vue

@@ -268,7 +268,7 @@ defineExpose({
         transition: opacity 0.2s;
         transition: opacity 0.2s;
         opacity: 0;
         opacity: 0;
         right: 0;
         right: 0;
-        background: #fff;
+        background: rgba(255, 255, 255, 0.25);
         border-radius: 2px;
         border-radius: 2px;
         .cu-tree-node-popover-menu-icon {
         .cu-tree-node-popover-menu-icon {
             display: flex;
             display: flex;

+ 2 - 1
src/views/other/components/HcUpload.vue

@@ -74,7 +74,8 @@ const uploadprogress = () => {
 }
 }
 
 
 //上传完成
 //上传完成
-const uploadSuccess = () => {
+const uploadSuccess = (res) => {
+    console.log(res)
     uploadDisabled.value = false
     uploadDisabled.value = false
     emit('finish', {type: 'success'})
     emit('finish', {type: 'success'})
     emit('progress', false)
     emit('progress', false)

+ 21 - 25
src/views/other/first-item.vue

@@ -155,17 +155,17 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import {nextTick, onMounted, ref, watch} from 'vue'
 import {useAppStore} from "~src/store";
 import {useAppStore} from "~src/store";
+import {nextTick, onMounted, ref, watch} from 'vue'
 import {useRouter, useRoute} from 'vue-router'
 import {useRouter, useRoute} from 'vue-router'
 import WbsTree from "./components/WbsTree.vue"
 import WbsTree from "./components/WbsTree.vue"
 import HcUpload from "./components/HcUpload.vue"
 import HcUpload from "./components/HcUpload.vue"
-import {getStoreData, setStoreData} from '~src/utils/storage'
-import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
 import HTableForm from "~src/plugins/HTableForm"
 import HTableForm from "~src/plugins/HTableForm"
 import {getReportNumber} from "~api/other";
 import {getReportNumber} from "~api/other";
 import firstApi from '~api/other/first-item';
 import firstApi from '~api/other/first-item';
 import tasksApi from '~api/tasks/data';
 import tasksApi from '~api/tasks/data';
+import {getStoreData, setStoreData} from '~src/utils/storage'
+import {getArrValue, isString, getObjValue, getObjNullValue,deepClone} from "vue-utils-plus"
 
 
 //变量
 //变量
 const router = useRouter()
 const router = useRouter()
@@ -308,32 +308,27 @@ const getTableData = async () => {
         tableListRef.value?.clearSelection()
         tableListRef.value?.clearSelection()
         tableSelectionKeys.value = []
         tableSelectionKeys.value = []
         tableListData.value = []
         tableListData.value = []
-
         //获取相关数据
         //获取相关数据
-        let firstListData = {}
+        let addFormData = {
+            projectId: projectId.value,
+            contractId: contractId.value,
+            isFirst: 1,
+        }
         const treeInfo = treeItem.value
         const treeInfo = treeItem.value
-        if (tabKey === 'mark') {
-            //获取已标记的首件
-            firstListData = await firstApi.getQueryPageData({
-                projectId: projectId.value,
-                contractId: contractId.value,
-                ...searchInfo,
-                wbsId: treeInfo['contractIdRelation'] ? treeInfo['id'] : treeInfo['primaryKeyId'],
-                isFirst: 1,
-            })
-        } else if (tabKey === 'query') {
-            //首件查询数据
-            firstListData = await firstApi.getPageData({
-                projectId: projectId.value,
-                contractId: contractId.value,
-                ...searchInfo,
-            })
-        } else {
-            firstListData = {error: true}
+        //已标记的首件
+        if (tabKey === 'mark' && addFormData['firstTitle']) {
+            delete addFormData.firstTitle
         }
         }
-
+        //查询数据
+        if (tabKey === 'query') {
+            addFormData['firstTitle'] = 1
+        }
+        addFormData['wbsId'] = treeInfo['contractIdRelation'] ? treeInfo['id'] : treeInfo['primaryKeyId']
         //处理数据
         //处理数据
-        const { error, code, data } = firstListData
+        const { error, code, data } = await firstApi.getQueryPageData({
+            ...addFormData,
+            ...searchInfo,
+        })
         tableLoading.value = false
         tableLoading.value = false
         if (!error && code === 200) {
         if (!error && code === 200) {
             tableListData.value = getArrValue(data['records'])
             tableListData.value = getArrValue(data['records'])
@@ -391,6 +386,7 @@ const getFirstExcelHtml = async () => {
     const temp = isString(data?.data) ? data?.data || '' : ''
     const temp = isString(data?.data) ? data?.data || '' : ''
     if (!error && code === 200 && temp) {
     if (!error && code === 200 && temp) {
         let pkeyId = data?.data?.id ?? null
         let pkeyId = data?.data?.id ?? null
+        uploadData.value = {pkeyId: pkeyId}
         setHTableForm(temp, cid, tableFormData.value)
         setHTableForm(temp, cid, tableFormData.value)
         getFirstBussDataInfo(pkeyId)
         getFirstBussDataInfo(pkeyId)
     } else {
     } else {