|
@@ -23,15 +23,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive } from "vue";
|
|
|
+import { ref, getCurrentInstance, onMounted, defineProps, defineExpose, watch, reactive, toRefs } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import testForm from "@/components/testForm/index.vue";
|
|
|
import { getUserInfo } from "@/utils/auth";
|
|
|
|
|
|
// 接收父组件的传值
|
|
|
const props = defineProps({
|
|
|
- queryData: String,
|
|
|
+ queryData: Object,
|
|
|
});
|
|
|
+const refProps = toRefs(props);
|
|
|
const proxy = getCurrentInstance().proxy;
|
|
|
const route = useRoute();
|
|
|
const active = ref(0);
|
|
@@ -501,11 +502,21 @@ const handleSubmit = async () => {
|
|
|
return formData.data;
|
|
|
};
|
|
|
watch(
|
|
|
- props.queryData,
|
|
|
+ refProps.queryData,
|
|
|
() => {
|
|
|
- if (props.queryData && [10, 20, 30].includes(route.query.processType)) {
|
|
|
- for (const key in props.queryData) {
|
|
|
- formData.data[key] = props.queryData[key];
|
|
|
+ if (refProps.queryData.value && ["10", "20", "30"].includes(route.query.processType)) {
|
|
|
+ for (const key in refProps.queryData.value) {
|
|
|
+ formData.data[key] = refProps.queryData.value[key];
|
|
|
+ }
|
|
|
+ formDom1.value.formDataShowLabelOne();
|
|
|
+ formDom2.value.formDataListShowLabelOne();
|
|
|
+ formDom4.value.formDataShowLabelOne();
|
|
|
+ if (["10", "20"].includes(route.query.processType)) {
|
|
|
+ formOption.readonly = true;
|
|
|
+ formDetailOption.readonly = true;
|
|
|
+ formDetailOption.btnConfig.isNeed = false;
|
|
|
+ formDetailTwoOption.readonly = true;
|
|
|
+ formReceiptPaymentOption.readonly = true;
|
|
|
}
|
|
|
}
|
|
|
},
|