|
@@ -0,0 +1,129 @@
|
|
|
+<template>
|
|
|
+ <div class="knowledge-2">
|
|
|
+ <div class="query mg-b-8">
|
|
|
+ <div class="query-items">
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable">查询内容:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-input v-model="content" placeholder="请输入查询内容"></el-input>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-actions" style="margin-right: 1500px">
|
|
|
+ <button class="btn green" @click="onClickSearch">搜索</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <ComTable :data="tableData"></ComTable>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import ComTable from "@com/coms/table/table.vue";
|
|
|
+
|
|
|
+export default {
|
|
|
+ components: { ComTable },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ content: "",
|
|
|
+ tableData: {
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ name: "所属类型",
|
|
|
+ field: "station",
|
|
|
+ is_num: true,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "位置",
|
|
|
+ field: "location",
|
|
|
+ is_num: false,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "工作内容",
|
|
|
+ field: "content",
|
|
|
+ is_num: false,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "描述",
|
|
|
+ field: "describe",
|
|
|
+ is_num: false,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "添加时间",
|
|
|
+ field: "addtime",
|
|
|
+ is_num: false,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "状态",
|
|
|
+ field: "state",
|
|
|
+ is_num: false,
|
|
|
+ is_light: false,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ data: [],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.requestSafeList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 搜索按钮
|
|
|
+ onClickSearch() {
|
|
|
+ this.requestSafeList();
|
|
|
+ },
|
|
|
+ // 获取按错内容
|
|
|
+ requestSafeList() {
|
|
|
+ let that = this;
|
|
|
+ this.API.requestData({
|
|
|
+ method: "GET",
|
|
|
+ baseURL: "http://10.155.32.4:8034/",
|
|
|
+ subUrl: "/experienceBase/zyzdzs",
|
|
|
+ data: {
|
|
|
+ name: that.content,
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1000,
|
|
|
+ }, // 请求所携带参数,默认为空,可缺省
|
|
|
+ success(res) {
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.tableData.data = [];
|
|
|
+ // let data = res.data;
|
|
|
+ // for (var i = 0; i < data.length; i++) {
|
|
|
+ // let obj = {
|
|
|
+ // id: i + 1,
|
|
|
+ // safecontent: data[i].safecontent,
|
|
|
+ // describe: data[i].describe,
|
|
|
+ // principal: data[i].principal,
|
|
|
+ // addtime: new Date(data[i].addtime).formatDate("yyyy-MM-dd"),
|
|
|
+ // type: data[i].type,
|
|
|
+ // other: data[i].other,
|
|
|
+ // };
|
|
|
+ that.tableData.data = res.data;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scope>
|
|
|
+@titleGray: #9ca5a8;
|
|
|
+@rowGray: #606769;
|
|
|
+@darkBack: #536268;
|
|
|
+.knowledge-2 {
|
|
|
+ .el-select {
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+ .el-input {
|
|
|
+ width: 200px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|