|
@@ -163,6 +163,7 @@ onActivated(() => {
|
|
|
constructUnitData.value=[]
|
|
|
supervisorUnitData.value=[]
|
|
|
bulidUnitData.value=[]
|
|
|
+ tableData.value=[{}]
|
|
|
tabsKey.value = 'base'
|
|
|
tabKey.value='construction'
|
|
|
getBudgetTypeList()
|
|
@@ -309,6 +310,7 @@ const tabsClick = (key) => {
|
|
|
}else{
|
|
|
if(key==='table'){
|
|
|
tabsKey.value = key
|
|
|
+
|
|
|
getProcessList(formBaseModel.value.projectId)
|
|
|
|
|
|
}
|
|
@@ -331,17 +333,25 @@ const formBaseRules = {
|
|
|
}
|
|
|
|
|
|
//类型tab数据和相关处理
|
|
|
-const tabKey = ref('construction')
|
|
|
-
|
|
|
+const tabKey = ref('')
|
|
|
+const tableData = ref([])//成本测算表格
|
|
|
+//深度监听
|
|
|
+watch(() => [
|
|
|
+ tabKey.value,
|
|
|
+ tableData.value,
|
|
|
+], ([val,table]) => {
|
|
|
+ if(val==='construction'){
|
|
|
+ constructUnitData.value=table
|
|
|
+ }
|
|
|
+}, {deep: true})
|
|
|
const tabTab = ref([
|
|
|
{key: 'bulid', name: '施工单位成本'},
|
|
|
{key: 'supervision', name: '监理单位成本'},
|
|
|
{key: 'construction', name: '建设单位成本'}
|
|
|
]);
|
|
|
+const savetabdata=ref([])//当前数据
|
|
|
const tabChange = ({key}) => {
|
|
|
tabKey.value = key
|
|
|
- console.log(key,'key');
|
|
|
- console.log(tableData.value,'tableData.value');
|
|
|
if(key=='supervision'){
|
|
|
tableData.value=supervisorUnitData.value.length>0?supervisorUnitData.value:originTableData.value
|
|
|
formBaseModel.value.supervisorUnit=tableData.value
|
|
@@ -351,7 +361,9 @@ const tabChange = ({key}) => {
|
|
|
console.log( formBaseModel.value.constructUnit,' formBaseModel.value.constructUnit');
|
|
|
}else if(key=='bulid'){
|
|
|
console.log(bulidUnitData.value,'=bulidUnitData.value');
|
|
|
- tableData.value=bulidUnitData.value.length>0?bulidUnitData.value:originTableData.value
|
|
|
+
|
|
|
+ tableData.value=bulidUnitData.value.length>0?bulidUnitData.value:[{}]
|
|
|
+ console.log( originTableData.value,' originTableData.value.value');
|
|
|
formBaseModel.value.buildUnit=tableData.value
|
|
|
}
|
|
|
|
|
@@ -378,7 +390,7 @@ const tableColumn = [
|
|
|
{key: 'budgetRemark', name: '测算备注', width: '160', align: 'center'},
|
|
|
{key: 'action', name: '操作', width: '200', align: 'center', fixed: 'right'},
|
|
|
]
|
|
|
-const tableData = ref([{}])
|
|
|
+
|
|
|
|
|
|
const originTableData=ref([ {}])
|
|
|
const addRow=()=>{
|