|
@@ -5,6 +5,7 @@
|
|
|
<a-select
|
|
<a-select
|
|
|
v-model:value="selectValue"
|
|
v-model:value="selectValue"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ :disabled="isDisabled"
|
|
|
:options="businessNames"
|
|
:options="businessNames"
|
|
|
@change="nameChange"
|
|
@change="nameChange"
|
|
|
/>
|
|
/>
|
|
@@ -73,6 +74,14 @@
|
|
|
</a-result>
|
|
</a-result>
|
|
|
<Loading v-if="loading" />
|
|
<Loading v-if="loading" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- <a-button
|
|
|
|
|
+ v-if="isDisabled"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ style="margin-top: 36px; width: 88px"
|
|
|
|
|
+ @click="goBack"
|
|
|
|
|
+ >
|
|
|
|
|
+ 上一步
|
|
|
|
|
+ </a-button> -->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -83,6 +92,7 @@ import Common from '../common/Common';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import { getBusinessName, getBusinessParams, execute } from './config';
|
|
import { getBusinessName, getBusinessParams, execute } from './config';
|
|
|
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
|
import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
dayjs.locale('zh-cn');
|
|
dayjs.locale('zh-cn');
|
|
|
const selectValue = ref('');
|
|
const selectValue = ref('');
|
|
@@ -95,10 +105,26 @@ const businessNames = ref([]); // 业务名数据
|
|
|
const allParams = ref([]);
|
|
const allParams = ref([]);
|
|
|
const archiveParams = reactive({});
|
|
const archiveParams = reactive({});
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
|
|
|
+const route = useRoute();
|
|
|
|
|
+const router = useRouter();
|
|
|
|
|
+const isDisabled = ref(false);
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- getName();
|
|
|
|
|
|
|
+ const {
|
|
|
|
|
+ query: { businessName: businessNameParam },
|
|
|
|
|
+ } = route;
|
|
|
|
|
+ if (businessNameParam) {
|
|
|
|
|
+ isDisabled.value = true;
|
|
|
|
|
+ selectValue.value = businessNameParam;
|
|
|
|
|
+ businessName.value = businessNameParam;
|
|
|
|
|
+ nameChange({}, { name: '' }, true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ getName();
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+// const goBack = () => {
|
|
|
|
|
+// router.back();
|
|
|
|
|
+// };
|
|
|
// 获取时间类型值
|
|
// 获取时间类型值
|
|
|
const dateChange = (_, dateString, paramName) => {
|
|
const dateChange = (_, dateString, paramName) => {
|
|
|
archiveParams[paramName] = dateString;
|
|
archiveParams[paramName] = dateString;
|
|
@@ -140,10 +166,16 @@ const getName = () => {
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
// 获取业务参数
|
|
// 获取业务参数
|
|
|
-const nameChange = (_, { name }) => {
|
|
|
|
|
|
|
+const nameChange = (_, { name }, flag) => {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
- businessName.value = name;
|
|
|
|
|
- getBusinessParams(name).then(
|
|
|
|
|
|
|
+ let nameParam;
|
|
|
|
|
+ if (flag) {
|
|
|
|
|
+ nameParam = businessName.value;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ nameParam = name;
|
|
|
|
|
+ businessName.value = name;
|
|
|
|
|
+ }
|
|
|
|
|
+ getBusinessParams(nameParam).then(
|
|
|
({ errorCode, datas, errorMessage }) => {
|
|
({ errorCode, datas, errorMessage }) => {
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
|
if (errorCode == 0) {
|
|
if (errorCode == 0) {
|