8
0
ZaiZai преди 10 месеца
родител
ревизия
089f33669a
променени са 3 файла, в които са добавени 39 реда и са изтрити 1 реда
  1. 3 0
      src/views/project/info/detail.vue
  2. 1 1
      src/views/project/info/info.vue
  3. 35 0
      src/views/project/info/template.vue

+ 3 - 0
src/views/project/info/detail.vue

@@ -3,6 +3,7 @@
         <div class="hc-project-info-drawer relative h-full">
             <hc-tab-card scrollbar :tabs="tabsData" :tab-key="tabsKey" is-action-btn :disabled="isDisabled" @change="tabsChange">
                 <HcInfo v-if="tabsKey === '1'" ref="infoRef" v-model="basicForm" />
+                <HcTemplate v-if="tabsKey === '2'" ref="tempRef" v-model="basicForm" />
                 <template #action>
                     <el-button hc-btn class="mr-4" :loading="submitLoading" @click="saveAndExit">保存并退出</el-button>
                     <el-button hc-btn type="primary" :loading="submitLoading" @click="saveAndNextStep">保存并进入下一步</el-button>
@@ -15,6 +16,7 @@
 <script setup>
 import { ref, watch } from 'vue'
 import HcInfo from './info.vue'
+import HcTemplate from './template.vue'
 import mainApi from '~api/project/project'
 import { getObjValue, isNullES } from 'js-fast-way'
 
@@ -109,6 +111,7 @@ const saveAndNextStep = async () => {
 
 //ref
 const infoRef = ref(null)
+const tempRef = ref(null)
 
 //保存数据
 const submitLoading = ref(false)

+ 1 - 1
src/views/project/info/info.vue

@@ -86,9 +86,9 @@
 </template>
 
 <script setup>
-import { formValidate, getArrValue } from 'js-fast-way'
 import { onMounted, ref, watch } from 'vue'
 import { getDictionaryData } from '~uti/tools'
+import { formValidate, getArrValue } from 'js-fast-way'
 import measureApi from '~api/measure/template'
 
 //双向绑定

+ 35 - 0
src/views/project/info/template.vue

@@ -0,0 +1,35 @@
+<template>
+    <div>
+        111
+    </div>
+</template>
+
+<script setup>
+import { onMounted, ref, watch } from 'vue'
+import measureApi from '~api/measure/template'
+
+//渲染完成
+onMounted(() => {
+
+})
+
+//双向绑定
+const modelData = defineModel('modelValue', {
+    default: {},
+})
+
+//监听数据
+const formModel = ref({})
+watch(() => modelData.value, (data) => {
+    formModel.value = data
+}, { immediate: true, deep: true })
+
+//监听表单数据
+watch(() => formModel.value, (data) => {
+    modelData.value = data
+}, { deep: true })
+</script>
+
+<style scoped lang="scss">
+
+</style>