|
@@ -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 {
|