Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
555b342f01
|
@ -0,0 +1,16 @@
|
||||||
|
import config from "@/config"
|
||||||
|
import http from "@/utils/request"
|
||||||
|
export default {
|
||||||
|
mplogx: {
|
||||||
|
list: {
|
||||||
|
name: "列表",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.HOST_URL}/hfnf_api/mplogx/`,
|
||||||
|
// "http://10.0.11.52:5800/mplogx/",
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
import config from "@/config"
|
||||||
|
import http from "@/utils/request"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
workchain: {
|
||||||
|
ask: {
|
||||||
|
name: "询问",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/ichat/workchain/ask/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
<template>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-card style="max-width: 480px" @click="goDetail">
|
||||||
|
<template #header>
|
||||||
|
<span>数据总量</span>
|
||||||
|
</template>
|
||||||
|
<span style="color:darkblue;font-size: 20px;font-weight: bold;">{{ total }}</span>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import API from '@/api'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
|
const total = ref(0)
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
API.hfnf.mplogx.list.req({page:1, page_size:1}).then(res=>{
|
||||||
|
total.value = res.count
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const goDetail = () => {
|
||||||
|
router.push("/hfnf_mplogx")
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,36 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<el-input v-model="query.mpoint_id" placeholder="测点ID" @keyup.enter="handQuery"/>
|
||||||
|
<el-button type="primary" @click="handQuery" icon="el-icon-search"></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:query="query"
|
||||||
|
>
|
||||||
|
<el-table-column label="测点ID" prop="mpoint_id" width="200"></el-table-column>
|
||||||
|
<el-table-column label="监测时间" prop="timex"></el-table-column>
|
||||||
|
<el-table-column label="监测值" prop="val_float"></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import API from '@/api'
|
||||||
|
const apiObj = ref(API.hfnf.mplogx.list);
|
||||||
|
const query = ref({});
|
||||||
|
const table = ref(null);
|
||||||
|
const handQuery = () => {
|
||||||
|
table.value.refresh();
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,38 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header height="160px">
|
||||||
|
<el-input :placeholder="plh"
|
||||||
|
v-model="input" type="textarea"
|
||||||
|
:rows="4" @keyup.enter="handleAsk"></el-input>
|
||||||
|
<el-button type="primary" size="large" style="margin-left: 10px;" @click="handleAsk">提问</el-button>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<iframe ref="myIframe" frameborder="0" width="100%" height="100%"></iframe>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import API from '@/api/index.js'
|
||||||
|
import { ElLoading } from 'element-plus'
|
||||||
|
|
||||||
|
const plh = ref('请以 查询 开头,提出您的查询统计分析需求');
|
||||||
|
const input = ref(null);
|
||||||
|
|
||||||
|
const myIframe = ref(null);
|
||||||
|
|
||||||
|
const handleAsk = () => {
|
||||||
|
if (input.value) {
|
||||||
|
const loading = ElLoading.service({
|
||||||
|
fullscreen: true,
|
||||||
|
text: "正在查询...请稍等",
|
||||||
|
});
|
||||||
|
API.ichat.workchain.ask.req({input: input.value}).then(res=>{
|
||||||
|
myIframe.value.srcdoc = res.content;
|
||||||
|
}).catch(err=>{
|
||||||
|
}).finally(()=>{
|
||||||
|
loading.close();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue