|
@@ -140,7 +140,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import {onActivated, ref} from "vue";
|
|
|
+import {onActivated, ref,watch} from "vue";
|
|
|
import {useRouter, useRoute} from 'vue-router'
|
|
|
import costApi from '~api/project/cost.js';
|
|
|
import {getArrValue,getObjValue,formValidate} from "js-fast-way"
|
|
@@ -159,6 +159,7 @@ onActivated(() => {
|
|
|
bulidUnitData.value=[]
|
|
|
tabsKey.value = 'base'
|
|
|
tabKey.value='construction'
|
|
|
+ getBudgetTypeList()
|
|
|
if(dataId.value.length>0){
|
|
|
getBudgetStatsById()
|
|
|
getProjectList(2)
|
|
@@ -168,7 +169,7 @@ onActivated(() => {
|
|
|
}
|
|
|
|
|
|
getCostTypeDict()
|
|
|
- getBudgetTypeList()
|
|
|
+
|
|
|
getPostDict()
|
|
|
|
|
|
|
|
@@ -176,6 +177,8 @@ onActivated(() => {
|
|
|
|
|
|
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
const projectList=ref([])
|
|
|
//获取项目下拉框
|
|
|
const getProjectList=async(type)=>{
|
|
@@ -354,6 +357,15 @@ const tableColumn = [
|
|
|
{key: 'action', name: '操作', width: '200', align: 'center', fixed: 'right'},
|
|
|
]
|
|
|
const tableData = ref([{}])
|
|
|
+//深度监听
|
|
|
+watch(() => [
|
|
|
+ tableData.value,
|
|
|
+], ([data]) => {
|
|
|
+ if(data!=={}&&data.length>0){
|
|
|
+ budgetTypeChange(data[0].budgetType)
|
|
|
+ }
|
|
|
+//
|
|
|
+}, {deep: true})
|
|
|
const originTableData=ref([ {}])
|
|
|
const addRow=()=>{
|
|
|
tableData.value.push({})
|