RFM分析联调

dev-QQq
HeHaonan 2 years ago
parent f8a745be3d
commit f88aa47876

@ -66,3 +66,11 @@ export function retrain(data) {
params: data,
});
}
//实训任务提交
export function submit(data) {
return request({
url: "/api/userBehavior/practicalTrainingSubmission",
method: "post",
data: data,
});
}

@ -16,7 +16,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
// baseURL: import.meta.env.VITE_APP_BASE_API,
baseURL:'http://192.168.2.6:9868/',
baseURL:'http://192.168.2.28:9868/',
// 超时
timeout: 10000
})

@ -6,6 +6,7 @@
</div>
</template>
<script setup>
import {defineExpose } from 'vue'
const props = defineProps({
currentComponent: {
type: Object,
@ -13,19 +14,25 @@ const props = defineProps({
},
});
const content = ref(null);
const consumerLeft = () => {
content.value.consumer();
};
const resLeft = () => {
content.value.practicalTraining();
};
const submitDataLeft = () => {
content.value.submitData();
// const consumerLeft = () => {
// content.value.consumer();
// };
// const resLeft = () => {
// content.value.practicalTraining();
// };
// const submitDataLeft = () => {
// content.value.submitData();
// };
// const submitMethod = () => {
// console.log(666);
// // content.value.submitData();
// };
const submitMethod = () => {
// console.log(666);
content.value.submitData()
};
defineExpose({
consumerLeft,
resLeft,
submitDataLeft,
submitMethod,
});
</script>
<style lang="scss" scoped>

File diff suppressed because one or more lines are too long

@ -13,8 +13,8 @@
</div>
</div>
</div>
<div class="btn">
<div class="submit">提交任</div>
<div class="btn" v-if="currentComponent">
<div class="submit" @click="submit"></div>
<div class="retrain">重新实训</div>
</div>
<div class="container" v-if="menuIndex != 0">
@ -264,11 +264,14 @@
<main-content
v-if="menuIndex == 0"
:currentComponent="currentComponent"
ref="contentRef"
></main-content>
</div>
</template>
<script setup>
import { ref } from "vue";
import { defineExpose } from "vue";
import * as portraitModel from "@/api/portraitModel";
import mainContent from "@/views/components/mainContent.vue";
import rfmAnalysis from "./components/rfmAnalysis.vue";
@ -282,7 +285,9 @@ import viscosityAnalysis from "./components/viscosityAnalysis.vue";
import AARRRAnalysis from "./components/AARRRAnalysis.vue";
import portraitAnalysis from "./components/portraitAnalysis.vue";
import { onMounted } from "vue";
const { proxy } = getCurrentInstance();
const currentComponent = ref(null);
const contentRef = ref(null);
const menuIndex = ref(1);
const tabIndex = ref(0);
const fileTable = ref([]);
@ -348,6 +353,7 @@ const tabList = ref([
backImg: "src/assets/images/icon10.png",
},
]);
// defineExpose({ submitMethod });
onMounted(() => {
getTableData("用户属性表");
});
@ -384,6 +390,12 @@ const changeTab = (item) => {
menuIndex.value = 0;
// tabIndex = item.id;
};
const submit = () => {
contentRef.value.submitMethod();
};
// defineExpose({
// submit,
// });
</script>
<style lang="scss" scoped>
@ -437,12 +449,12 @@ const changeTab = (item) => {
}
}
}
.btn{
.btn {
display: flex;
position: absolute;
right: 70px;
top: 110px;
.submit{
.submit {
width: 99px;
height: 31px;
background-image: url("@/assets/images/submit.png");
@ -450,8 +462,9 @@ const changeTab = (item) => {
font-size: 14px;
line-height: 31px;
padding-left: 30px;
cursor: pointer;
}
.retrain{
.retrain {
width: 99px;
height: 31px;
background-image: url("@/assets/images/retrain.png");
@ -460,6 +473,7 @@ const changeTab = (item) => {
line-height: 31px;
padding-left: 30px;
margin-left: 20px;
cursor: pointer;
}
}
.container {

Loading…
Cancel
Save