|
@@ -2,9 +2,8 @@
|
|
|
<hc-card-item class="hc-test-sample-card-item">
|
|
|
<template #header>
|
|
|
<div class="w-200px">
|
|
|
- <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
|
|
|
- <el-option label="测试1" value="1" />
|
|
|
- <el-option label="测试2" value="2" />
|
|
|
+ <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable block>
|
|
|
+ <el-option v-for="item in contractData" :key="item.id" :label="item.contractName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="ml-2 w-250px">
|
|
@@ -86,7 +85,8 @@
|
|
|
<script setup>
|
|
|
import { onMounted, ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { getObjValue } from 'js-fast-way'
|
|
|
+import { getErtractInfo } from '~api/other'
|
|
|
+import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
|
|
|
//参数
|
|
|
const props = defineProps({
|
|
@@ -103,7 +103,7 @@ const contractId = ref(store.getContractId)
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
-
|
|
|
+ getContractData()
|
|
|
})
|
|
|
|
|
|
//监听数据
|
|
@@ -115,6 +115,22 @@ watch(() => props.tree, (obj) => {
|
|
|
//搜索表单
|
|
|
const searchForm = ref({ current: 1, size: 20, total: 0 })
|
|
|
|
|
|
+
|
|
|
+//获取合同段信息
|
|
|
+const contractData = ref([])
|
|
|
+const getContractData = async () => {
|
|
|
+ const { data } = await getErtractInfo({
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ })
|
|
|
+ const res = getArrValue(data)
|
|
|
+ contractData.value = res
|
|
|
+ if (res.length > 0) {
|
|
|
+ searchForm.value.contractId = res[0].id
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
//日期时间被选择
|
|
|
const betweenTime = ref(null)
|
|
|
const betweenTimeUpdate = ({ arr }) => {
|