|
|
|
@ -5,15 +5,15 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="page-body">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<span>监测设备类型:</span>
|
|
|
|
|
<span>导出类型:</span>
|
|
|
|
|
<el-select v-model="jcsbType" @change="changeJg">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in jcsbOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.mc + '(' + item.tablename + ')'"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:key="item.modevtypeId"
|
|
|
|
|
:label="item.typeName + '(' + item.tableName + ')'"
|
|
|
|
|
:value="item.modevtypeId"
|
|
|
|
|
>
|
|
|
|
|
{{ item.mc + "(" + item.tablename + ")" }}
|
|
|
|
|
{{ item.typeName + "(" + item.tableName + ")" }}
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
@ -52,7 +52,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import { modevtypeListAllApi, listRecordApi } from "@/utils/api/index";
|
|
|
|
|
import { listConfigApi, listRecordApi } from "@/utils/api/index";
|
|
|
|
|
// import addzsbDialog from "./components/addzsbDialog";
|
|
|
|
|
export default {
|
|
|
|
|
name: "record",
|
|
|
|
@ -60,7 +60,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
jcsbType: "",
|
|
|
|
|
jcsbOptions: [{ id: -1, mc: "全部", tablename: "all" }],
|
|
|
|
|
jcsbOptions: [{ modevtypeId: -1, typeName: "全部", tableName: "all" }],
|
|
|
|
|
selectTableName: "",
|
|
|
|
|
recordData: [],
|
|
|
|
|
recordLoading: false,
|
|
|
|
@ -73,13 +73,12 @@ export default {
|
|
|
|
|
watch: {},
|
|
|
|
|
methods: {
|
|
|
|
|
getjcsbListAll() {
|
|
|
|
|
modevtypeListAllApi()
|
|
|
|
|
listConfigApi()
|
|
|
|
|
.then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.jcsbOptions = this.jcsbOptions.concat(res.data);
|
|
|
|
|
|
|
|
|
|
this.jcsbType = this.jcsbOptions[0].id;
|
|
|
|
|
this.selectTableName = this.jcsbOptions[0].tablename;
|
|
|
|
|
this.jcsbType = this.jcsbOptions[0].modevtypeId;
|
|
|
|
|
this.selectTableName = this.jcsbOptions[0].tableName;
|
|
|
|
|
this.exportFun();
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {
|
|
|
|
@ -89,7 +88,9 @@ export default {
|
|
|
|
|
//选中的值获取tablename
|
|
|
|
|
changeJg(val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
let selectedOption = this.jcsbOptions.find((item) => item.id === val);
|
|
|
|
|
let selectedOption = this.jcsbOptions.find(
|
|
|
|
|
(item) => item.modevtypeId === val
|
|
|
|
|
);
|
|
|
|
|
if (selectedOption) {
|
|
|
|
|
// 如果找到了匹配的项,访问它的 tablename
|
|
|
|
|
this.selectTableName = selectedOption.tablename;
|
|
|
|
|