East 3 лет назад
Родитель
Сommit
72385e35b6
100 измененных файлов с 1087 добавлено и 15635 удалено
  1. 168 0
      src/components/modal-cpn/ModalCpn.vue
  2. 11 0
      src/components/modal-cpn/index.js
  3. 6 2
      src/components/search-cpn/SearchCpn.vue
  4. 73 0
      src/components/table-cpn/RightHandler.vue
  5. 145 0
      src/components/table-cpn/TableContent.vue
  6. 167 5
      src/components/table-cpn/TableCpn.vue
  7. 11 0
      src/components/table-cpn/index.js
  8. 20 0
      src/directives/location-format.js
  9. 4 2
      src/main.js
  10. 81 9
      src/router/ChildrenRouters.js
  11. 11 0
      src/utils/bus.js
  12. 19 475
      src/utils/chenApi.js
  13. 0 121
      src/views/Alarm/AlarmSet.vue
  14. 0 370
      src/views/Alarm/AlarmWarn.vue
  15. 0 209
      src/views/Alarm/EnvWarn.vue
  16. 0 229
      src/views/Alarm/EventRem.vue
  17. 0 13
      src/views/Alarm/Outage.vue
  18. 0 202
      src/views/Alarm/SewageWarn.vue
  19. 0 204
      src/views/Alarm/ViolationUser.vue
  20. 0 220
      src/views/Alarm/alarm-set/AlarmForm.vue
  21. 0 173
      src/views/Alarm/alarm-set/RegularForm.vue
  22. 0 48
      src/views/Alarm/alarm-set/SetTitle.vue
  23. 0 141
      src/views/Alarm/alarm-set/alarm-table.vue
  24. 0 168
      src/views/Alarm/chart/AlarmBar.vue
  25. 0 161
      src/views/Alarm/chart/AlarmPie.vue
  26. 0 309
      src/views/BioSafety/BenconAdmin.vue
  27. 0 821
      src/views/BioSafety/CarAdmin.vue
  28. 0 382
      src/views/BioSafety/DeadPig.vue
  29. 0 305
      src/views/BioSafety/DoorAdmin.vue
  30. 0 426
      src/views/BioSafety/PersonAdmin.vue
  31. 0 310
      src/views/BioSafety/SaleAdmin.vue
  32. 0 117
      src/views/BioSafety/StiflingAdmin.vue
  33. 0 51
      src/views/BioSafety/carAdmin/queryCondition.config.js
  34. 0 189
      src/views/BioSafety/carAdmin/table.config.js
  35. 0 155
      src/views/BioSafety/chart/ChartCarDrying.vue
  36. 0 144
      src/views/BioSafety/chart/ChartElectro.vue
  37. 0 131
      src/views/BioSafety/chart/CostHistogram.vue
  38. 0 30
      src/views/BioSafety/deadPig/queryCondition.config.js
  39. 0 39
      src/views/BioSafety/deadPig/table.config.js
  40. 0 30
      src/views/BioSafety/doorAdmin/queryCondition.config.js
  41. 0 39
      src/views/BioSafety/doorAdmin/table.config.js
  42. 0 204
      src/views/BioSafety/personAdmin/AddOrEdit.vue
  43. 0 80
      src/views/BioSafety/personAdmin/queryCondition.config.js
  44. 0 118
      src/views/BioSafety/personAdmin/table.config.js
  45. 0 20
      src/views/BioSafety/stiflingAdmin/queryCondition.config.js
  46. 0 45
      src/views/BioSafety/stiflingAdmin/table.config.js
  47. 0 258
      src/views/DeviceMana/Device.vue
  48. 0 155
      src/views/DeviceMana/device/AddOrEdit.vue
  49. 0 50
      src/views/DeviceMana/device/ManageItem.vue
  50. 0 71
      src/views/DeviceMana/device/table.config.js
  51. 0 485
      src/views/Env/DrinkWater.vue
  52. 0 191
      src/views/Env/Electro.vue
  53. 0 372
      src/views/Env/PigHouseEnv.vue
  54. 0 430
      src/views/Env/SalePig.vue
  55. 0 298
      src/views/Env/Stark.vue
  56. 0 168
      src/views/Env/chart/ChartElecLines.vue
  57. 0 138
      src/views/Env/chart/ChartElectro.vue
  58. 0 145
      src/views/Env/chart/ChartPigHum.vue
  59. 0 145
      src/views/Env/chart/ChartPigTemp.vue
  60. 0 148
      src/views/Env/chart/ChartSalePig.vue
  61. 0 155
      src/views/Env/chart/ChartStark.vue
  62. 0 169
      src/views/Env/chart/ChartStarkBar.vue
  63. 0 136
      src/views/Env/chart/ChartStarkBarOne.vue
  64. 0 138
      src/views/Env/chart/ChartWaterPie.vue
  65. 0 925
      src/views/PdcData/Analysis.vue
  66. 0 13
      src/views/PdcData/CheckLog.vue
  67. 0 223
      src/views/PdcData/CheckPig.vue
  68. 0 224
      src/views/PdcData/analysis/ChartInventoryLines.vue
  69. 0 192
      src/views/PdcData/analysis/ChartInventoryPie.vue
  70. 0 215
      src/views/PdcData/analysis/CostHistogram.vue
  71. 0 174
      src/views/PdcData/analysis/CostPie.vue
  72. 0 210
      src/views/PdcData/analysis/ImportantLine.vue
  73. 0 197
      src/views/PdcData/analysis/InventoryItems.vue
  74. 0 46
      src/views/PdcData/analysis/ProductionDonuts.vue
  75. 0 213
      src/views/PdcData/analysis/ProductionItems.vue
  76. 0 192
      src/views/PdcData/analysis/SalesChart.vue
  77. 0 65
      src/views/PdcData/analysis/WorkInfos.vue
  78. 0 44
      src/views/PdcData/analysis/safetyTable.config.js
  79. 0 38
      src/views/PdcData/analysis/salesXForm.config.js
  80. 0 38
      src/views/PdcData/analysis/table.config.js
  81. 0 32
      src/views/PdcData/analysis/yingshouTable.config.js
  82. 0 290
      src/views/Video/AreaAdmin.vue
  83. 0 327
      src/views/Video/CameraBrand.vue
  84. 0 633
      src/views/Video/VideoAdmin.vue
  85. 0 297
      src/views/Video/VideoLook.vue
  86. 0 186
      src/views/Zoology/Sewage.vue
  87. 0 256
      src/views/Zoology/chart/ChartSewageCorona.vue
  88. 0 162
      src/views/Zoology/chart/ChartSewageLine.vue
  89. 166 0
      src/views/basic-data/archives-admin/ArchivesAdmin.vue
  90. 43 0
      src/views/basic-data/archives-admin/config/modal.config.js
  91. 43 0
      src/views/basic-data/archives-admin/config/search.config.js
  92. 36 0
      src/views/basic-data/archives-admin/config/table.config.js
  93. 17 0
      src/views/basic-data/device-admin/DeviceAdmin.vue
  94. 17 0
      src/views/basic-data/house-admin/HouseAdmin.vue
  95. 1 90
      src/views/dashboard/dashboard.vue
  96. 17 0
      src/views/eartag-admin/analysis-res/AnalysisRes.vue
  97. 17 0
      src/views/eartag-admin/device-status/DeviceStatus.vue
  98. 14 4
      src/views/summary-data/individual-data/IndividualData.vue
  99. 0 0
      src/views/eartag-admin/eartag-data/config/search.config.js
  100. 0 0
      src/views/eartag-admin/eartag-data/config/table.config.js

+ 168 - 0
src/components/modal-cpn/ModalCpn.vue

@@ -0,0 +1,168 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 16:02:11
+ * @LastEditTime: 2022-01-08 17:40:31
+ * @LastEditors: Please set LastEditors
+ * @Description: 新增 or 编辑表单
+ * @FilePath: \goldenPig\src\components\form-cpn\FormCpn.vue
+-->
+<template>
+  <div class="form-cpn">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="title"
+      width="30%"
+      center
+      destroy-on-close
+    >
+      <el-form :label-width="formStyle.labelWidth" :size="formStyle.size">
+        <template v-for="item in modalItemProp">
+          <el-form-item :label="item.label" :key="item.label">
+            <el-input
+              v-if="item.type === 'input'"
+              v-model="form[item.field]"
+              :placeholder="item.placeholder"
+            >
+            </el-input>
+
+            <el-select
+              v-else-if="item.type === 'select'"
+              v-model="form[item.field]"
+              :placeholder="item.placeholder"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="option in item.options"
+                :key="option.label"
+                v-bind="option"
+              >
+              </el-option>
+            </el-select>
+
+            <el-date-picker
+              v-else-if="item.type === 'datePicker'"
+              type="daterange"
+              range-separator="至"
+              :start-placeholder="item.placeholder[0]"
+              :end-placeholder="item.placeholder[1]"
+              value-format="yyyy-MM-dd"
+              v-model="form[item.field]"
+              style="width: 100%"
+            >
+            </el-date-picker>
+
+            <!-- 具名插槽,element ui 的表单元素无法包括的 -->
+            <slot
+              v-else-if="item.type === 'custom'"
+              :name="item.slotName"
+              :item="item"
+            >
+            </slot>
+          </el-form-item>
+        </template>
+      </el-form>
+
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button size="mini" @click="dialogVisible = false">
+            取消
+          </el-button>
+          <el-button size="mini" type="primary" @click="handleComfirmClick">
+            确定
+          </el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// 事件总线
+import EventBus from "@/utils/bus.js";
+
+export default {
+  props: {
+    formStyle: {
+      // el-form 的样式
+      type: Object,
+      default: () => ({
+        labelWidth: "140px",
+        size: "small",
+        gutter: 30,
+        colLayout: {
+          lg: 8,
+          md: 12,
+          sm: 24,
+        },
+      }),
+    },
+    modalItemProp: {
+      // el-form-item 的限定
+      type: Array,
+      required: true,
+    },
+    modalForm: {
+      type: Object,
+      required: true,
+    },
+    otherParams: {
+      type: Object,
+      required: true,
+    },
+    // 网络请求
+    requests: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      form: {},
+      needBlanks: 0,
+      btnsBottom: false,
+      dialogVisible: false,
+      title: "",
+    };
+  },
+  methods: {
+    // 初始化 - 新增 or 编辑的初始状态
+    init(row) {
+      this.dialogVisible = true;
+      if (row.id) {
+        this.dialogVisible = true;
+        this.$nextTick(() => {
+          this.form = { ...row };
+        });
+      }
+      this.form = { ...this.modalForm };
+    },
+    // 点击确定按钮
+    handleComfirmClick() {
+      // this.dialogVisible = false;
+      if (this.form.id) {
+        this.requests
+          .edit({ ...this.form, ...this.otherParams })
+          .then((res) => {
+            if (res.code === 10000) {
+              this.$message.success(res.message);
+              EventBus.$emit("refresh");
+              this.dialogVisible = false;
+            } else {
+              this.$message.error(res.message);
+            }
+          });
+      } else {
+        this.requests.add({ ...this.form, ...this.otherParams }).then((res) => {
+          if (res.code === 10000) {
+            this.$message.success(res.message);
+            EventBus.$emit("refresh");
+            this.dialogVisible = false;
+          } else {
+            this.$message.error(res.message);
+          }
+        });
+      }
+    },
+  },
+};
+</script>
+<style scoped></style>

+ 11 - 0
src/components/modal-cpn/index.js

@@ -0,0 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-08 16:01:44
+ * @LastEditTime: 2022-01-08 16:10:07
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\components\form-cpn\index.js
+ */
+import ModalCpn from './ModalCpn.vue'
+
+export default ModalCpn

+ 6 - 2
src/components/search-cpn/SearchCpn.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-06 13:53:10
- * @LastEditTime: 2022-01-06 18:29:09
+ * @LastEditTime: 2022-01-08 16:24:22
  * @LastEditors: Please set LastEditors
  * @Description: 搜索组件
  * @FilePath: \goldenPig\src\components\search-cpn\SearchCpn.vue
@@ -26,7 +26,11 @@
                 :placeholder="item.placeholder"
                 style="width: 100%"
               >
-                <el-option v-for="option in item.options" :key="option.value">
+                <el-option
+                  v-for="option in item.options"
+                  :key="option.label"
+                  v-bind="option"
+                >
                 </el-option>
               </el-select>
 

+ 73 - 0
src/components/table-cpn/RightHandler.vue

@@ -0,0 +1,73 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-07 14:12:57
+ * @LastEditTime: 2022-01-08 15:44:36
+ * @LastEditors: Please set LastEditors
+ * @Description: 右侧默认的组件
+ * @FilePath: \goldenPig\src\components\table-cpn\RightHandler.vue
+-->
+<template>
+  <div class="right-handler">
+    <el-tooltip effect="dark" content="刷新" placement="top">
+      <div class="right-a">
+        <i class="el-icon-refresh-right i-size"></i>
+      </div>
+    </el-tooltip>
+    <el-tooltip effect="dark" content="密度" placement="top">
+      <el-dropdown trigger="click" placement="bottom">
+        <div class="right-a">
+          <i class="el-icon-rank i-size"></i>
+        </div>
+        <el-dropdown-menu slot="dropdown" class="reset-dropdown">
+          <el-dropdown-item @click.native="clickSize(0)">
+            默认
+          </el-dropdown-item>
+          <el-dropdown-item @click.native="clickSize(1)">
+            中等
+          </el-dropdown-item>
+          <el-dropdown-item @click.native="clickSize(2)">
+            紧凑
+          </el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </el-tooltip>
+  </div>
+</template>
+<script>
+export default {
+  model: {
+    prop: "size",
+    event: "sizeChange",
+  },
+  props: ["size"],
+  data() {
+    return {
+      sizeArr: ["small", "medium", "mini"],
+    };
+  },
+  methods: {
+    clickSize(index) {
+      this.$emit("sizeChange", this.sizeArr[index]);
+    },
+  },
+};
+</script>
+<style scoped>
+.right-handler {
+  display: flex;
+}
+.right-a {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
+.i-size {
+  font-size: 20px;
+  cursor: pointer;
+  margin-left: 10px;
+}
+.reset-dropdown {
+  margin-left: 6px;
+}
+</style>

+ 145 - 0
src/components/table-cpn/TableContent.vue

@@ -0,0 +1,145 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 14:47:24
+ * @LastEditTime: 2022-01-08 17:06:51
+ * @LastEditors: Please set LastEditors
+ * @Description: 表格
+ * @FilePath: \goldenPig\src\components\table-cpn\TableContent.vue
+-->
+<template>
+  <div class="table-content">
+    <div class="header">
+      <div class="left">
+        <slot name="leftTitle"> </slot>
+      </div>
+      <div class="right">
+        <slot name="rightHandler"> </slot>
+      </div>
+    </div>
+
+    <div class="content">
+      <el-table :data="dataList" :size="tableSize" :height="height" border>
+        <el-table-column
+          v-if="shows.select"
+          type="selection"
+          width="55"
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          v-if="shows.index"
+          type="index"
+          label="序号"
+          width="60"
+          align="center"
+        >
+        </el-table-column>
+        <template v-for="item in propList">
+          <el-table-column :key="item.label" v-bind="item" align="center">
+            <template #default="scope">
+              <slot :name="item.slotName" :row="scope.row"> </slot>
+            </template>
+          </el-table-column>
+        </template>
+      </el-table>
+    </div>
+
+    <div class="footer">
+      <el-pagination
+        @size-change="sizeChange"
+        @current-change="currentChange"
+        :current-page="currentPage"
+        :page-sizes="pageSizes"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    /** 表格 */
+    height: {
+      type: Number,
+      default: 458,
+    },
+    propList: {
+      type: Array,
+      required: true,
+    },
+    shows: {
+      type: Object,
+      default: () => ({
+        select: true,
+        index: true,
+      }),
+    },
+    dataList: {
+      type: Array,
+      required: true,
+    },
+    tableSize: {
+      type: String,
+      default: "small",
+    },
+    /** 分页 */
+    pageSizes: {
+      type: Array,
+      default: () => [10, 20, 40, 100],
+    },
+    total: {
+      type: Number,
+      default: 0,
+    },
+  },
+  data() {
+    return {
+      /** 分页 */
+      pageSize: 10,
+      currentPage: 1,
+    };
+  },
+  methods: {
+    /** 分页相关 */
+    sizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.$emit("handleSizeChange", this.pageSize);
+    },
+    currentChange(val) {
+      this.currentPage = val;
+      this.$emit("handleCurrentChange", this.currentPage);
+    },
+  },
+};
+</script>
+<style scoped>
+.table-content {
+  margin: 15px;
+  background-color: #fff;
+  border-radius: 5px;
+  padding: 25px;
+}
+
+.header {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  margin-bottom: 10px;
+  padding: 0 5px;
+}
+
+.right {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+
+.footer {
+  margin-top: 15px;
+  text-align: right;
+}
+</style>

+ 167 - 5
src/components/table-cpn/TableCpn.vue

@@ -1,15 +1,177 @@
 <!--
  * @Author: your name
  * @Date: 2022-01-06 16:46:18
- * @LastEditTime: 2022-01-06 16:46:18
+ * @LastEditTime: 2022-01-08 18:20:40
  * @LastEditors: Please set LastEditors
- * @Description: 表格
+ * @Description: 再封一次
  * @FilePath: \goldenPig\src\components\table-cpn\TableCpn.vue
 -->
 <template>
-  <div class="table-cpn"></div>
+  <div class="table-cpn">
+    <table-content
+      :propList="propList"
+      :dataList="dataList"
+      :total="total"
+      @handleSizeChange="sizeChange"
+      @handleCurrentChange="currentChange"
+      :tableSize="tableSize"
+    >
+      <template #leftTitle>
+        <el-button
+          v-if="hasPerm(permission + ':add')"
+          size="small"
+          @click="addOrEdit"
+        >
+          新增
+        </el-button>
+      </template>
+      <template #rightHandler>
+        <right-handler v-model="tableSize" @refresh="init"></right-handler>
+      </template>
+
+      <template v-for="item in propListFilter" #[item.slotName]="scope">
+        <div :key="item.label">
+          <slot :name="item.slotName" :row="scope.row">{{
+            scope.row[item.slotName]
+          }}</slot>
+        </div>
+      </template>
+
+      <!-- 操作 -->
+      <template #handler="scope">
+        <div class="handleBtns">
+          <el-button
+            v-if="hasPerm(permission + ':edit')"
+            size="mini"
+            @click="addOrEdit(scope.row)"
+          >
+            编辑
+          </el-button>
+          <el-popconfirm
+            confirm-button-text="确定"
+            cancel-button-text="取消"
+            icon="el-icon-info"
+            icon-color="red"
+            :title="delTitle"
+            @confirm="handleDel(scope.row)"
+          >
+            <el-button
+              slot="reference"
+              v-if="hasPerm(permission + ':del')"
+              size="mini"
+              @click="handleDelTitle(scope.row)"
+            >
+              删除
+            </el-button>
+          </el-popconfirm>
+        </div>
+      </template>
+    </table-content>
+  </div>
 </template>
 <script>
-export default {};
+import TableContent from "./TableContent.vue";
+import RightHandler from "./RightHandler.vue";
+// 事件总线
+import EventBus from "@/utils/bus.js";
+
+export default {
+  components: {
+    TableContent,
+    RightHandler,
+  },
+  props: {
+    propList: {
+      type: Array,
+      required: true,
+    },
+    permission: {
+      type: String,
+      required: true,
+    },
+    requests: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      // 表格
+      propListFilter: [],
+      tableSize: "small",
+      pageSize: 10,
+      currentPage: 1,
+      dataList: [],
+      total: 0,
+      delTitle: "",
+    };
+  },
+  created() {
+    this.propListFilter = this.propList.filter((item) => {
+      return item.slotName !== "handler";
+    });
+  },
+  mounted() {
+    this.init();
+    const _this = this;
+    EventBus.$on("refresh", () => {
+      _this.init();
+    });
+  },
+  methods: {
+    // 请求网络数据
+    init() {
+      this.requests
+        .list({
+          size: this.pageSize,
+          current: this.currentPage,
+        })
+        .then((res) => {
+          if (res.code === 10000) {
+            this.dataList = res.data.records;
+            this.total = res.data.total;
+          } else {
+            this.dataList = [];
+            this.total = 0;
+            this.$message.error(res.message);
+          }
+        });
+    },
+    // 新增 or 编辑 点击事件
+    addOrEdit(row) {
+      this.$emit("handleAddOrEdit", row);
+    },
+    // 删除 点击事件
+    handleDelTitle(row) {
+      this.delTitle = `确定删除 ${row.farmName}`;
+    },
+    handleDel(row) {
+      this.requests.del({ ids: row.id }).then((res) => {
+        if (res.code === 10000) {
+          this.$message.success(res.message);
+          this.init();
+        } else {
+          this.$message.error(res.message);
+        }
+      });
+    },
+    /** 分页相关 */
+    sizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.init();
+    },
+    currentChange(val) {
+      this.currentPage = val;
+      this.init();
+    },
+  },
+};
 </script>
-<style scoped></style>
+<style scoped>
+.handleBtns {
+  padding: 0 20px;
+  display: flex;
+  justify-content: space-around;
+}
+</style>

+ 11 - 0
src/components/table-cpn/index.js

@@ -0,0 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-07 13:23:36
+ * @LastEditTime: 2022-01-07 13:24:40
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\components\table-cpn\index.js
+ */
+import TableCpn from './TableCpn.vue'
+
+export default TableCpn

+ 20 - 0
src/directives/location-format.js

@@ -0,0 +1,20 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-08 17:11:14
+ * @LastEditTime: 2022-01-08 17:20:18
+ * @LastEditors: Please set LastEditors
+ * @Description: 位置的格式化
+ * @FilePath: \goldenPig\src\directives\location-format.js
+ */
+import { CodeToText } from "element-china-area-data";
+
+export function directiveLocationFormat(app) {
+  app.directive('location', (el, binding) => {
+    const codes = binding.value.data.split(',')
+    let location = ''
+    codes.forEach(item => {
+      location += CodeToText[item]
+    })
+    el.innerText = location
+  })
+}

+ 4 - 2
src/main.js

@@ -1,8 +1,8 @@
 /*
  * @Author: your name
  * @Date: 2022-01-04 15:14:05
- * @LastEditTime: 2022-01-06 13:59:38
- * @LastEditors: your name
+ * @LastEditTime: 2022-01-08 15:15:00
+ * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \goldenPig\src\main.js
  */
@@ -16,10 +16,12 @@ import { hasBtnPermission } from './utils/permission';
 import { Modal } from 'ant-design-vue';
 import './assets/ttf/font.css';
 import echart from 'echarts';
+import {directiveLocationFormat} from '@/directives/location-format'
 
 Vue.config.productionTip = false
 Vue.use(ElementUI);
 Vue.use(Modal);
+Vue.use(directiveLocationFormat)
 Vue.prototype.hasPerm = hasBtnPermission
 Vue.prototype.$echarts = echart
 

+ 81 - 9
src/router/ChildrenRouters.js

@@ -1,7 +1,7 @@
 /*
  * @Author: your name
  * @Date: 2022-01-04 15:14:05
- * @LastEditTime: 2022-01-06 14:56:16
+ * @LastEditTime: 2022-01-08 14:35:30
  * @LastEditors: Please set LastEditors
  * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  * @FilePath: \goldenPig\src\router\ChildrenRouters.js
@@ -31,22 +31,94 @@ const childrenRouters = [
 
   /*
   *
-  * 汇总数据
+  * 耳标管理
   *
   * */
- {
-    path: '/individualData',
-    name: 'IndividualData',
-    component: () => import('../views/summary-data/individual-data/IndividualData.vue'),
+  {
+    path: '/deviceStatus',
+    name: 'DeviceStatus',
+    component: () => import('@/views/eartag-admin/device-status/DeviceStatus.vue'),
+    meta: {
+      title: '设备查看',
+      permission: 'deviceStatus',
+      parentName: '耳标管理'
+    }
+  },
+  {
+    path: '/eartagData',
+    name: 'EartagData',
+    component: () => import('@/views/eartag-admin/eartag-data/EartagData.vue'),
+    meta: {
+      title: '耳标数据',
+      permission: 'eartagData',
+      parentName: '耳标管理'
+    }
+  },
+  {
+    path: '/analysisRes',
+    name: 'AnalysisRes',
+    component: () => import('@/views/eartag-admin/analysis-res/AnalysisRes.vue'),
+    meta: {
+      title: '分析统计',
+      permission: 'analysisRes',
+      parentName: '耳标管理'
+    }
+  },
+
+  /*
+  *
+  * 检疫管理
+  *
+  * */
+  {
+    path: '/vaccineAdmin',
+    name: 'VaccineAdmin',
+    component: () => import('@/views/vaccine-admin/VaccineAdmin.vue'),
     meta: {
-      title: '个体数据',
-      permission: 'individualData',
-      parentName: '汇总数据'
+      title: '检疫管理',
+      permission: 'vaccineAdmin',
+      parentName: '检疫管理'
     }
   },
 
   /*
   *
+  * 基础资料
+  *
+  * */
+  {
+    path: '/archivesAdmin',
+    name: 'ArchivesAdmin',
+    component: () => import('@/views/basic-data/archives-admin/ArchivesAdmin.vue'),
+    meta: {
+      title: '档案管理',
+      permission: 'archivesAdmin',
+      parentName: '基础资料'
+    }
+  },
+  {
+    path: '/houseAdmin',
+    name: 'HouseAdmin',
+    component: () => import('@/views/basic-data/house-admin/HouseAdmin.vue'),
+    meta: {
+      title: '栋舍管理',
+      permission: 'houseAdmin',
+      parentName: '基础资料'
+    }
+  },
+  {
+    path: '/deviceAdmin',
+    name: 'DeviceAdmin',
+    component: () => import('@/views/basic-data/device-admin/DeviceAdmin.vue'),
+    meta: {
+      title: '设备管理',
+      permission: 'deviceAdmin',
+      parentName: '基础资料'
+    }
+  },
+  
+  /*
+  *
   * 系统管理
   *
   * */

+ 11 - 0
src/utils/bus.js

@@ -0,0 +1,11 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-08 17:32:06
+ * @LastEditTime: 2022-01-08 17:33:32
+ * @LastEditors: Please set LastEditors
+ * @Description: 事件总线
+ * @FilePath: \goldenPig\src\utils\bus.js
+ */
+import Vue from 'vue'
+
+export default new Vue()

+ 19 - 475
src/utils/chenApi.js

@@ -1,504 +1,48 @@
 /*
  * @Author: your name
- * @Date: 2021-11-18 13:40:39
- * @LastEditTime: 2021-12-25 19:20:05
+ * @Date: 2022-01-08 14:40:20
+ * @LastEditTime: 2022-01-08 15:55:10
  * @LastEditors: Please set LastEditors
- * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- * @FilePath: \hyyfClient\src\utils\chenApi.js
+ * @Description: 请求
+ * @FilePath: \goldenPig\src\utils\chenApi.js
  */
-import axios from './http';
+import axios from "./http";
 
-/** 生物安全 */
-/* 人员档案 */
-// 新增人员
-export function addPerson(data) {
-  return axios({
-    url: 'video/person/addPerson',
-    method: 'post',
-    data: data
-  })
-}
-// 新增人员 - 图片
-export function addPersonPicture(data, token) {
-  return axios({
-    url: 'video/person/addPersonPicture',
-    method: 'post',
-    data,
-    headers: {
-      "Authorization": `bearer ${token}`
-    }
-  })
-}
-
-export function addPictureToPerson(data) {
-  return axios({
-    url: 'video/person/addPictureToPerson',
-    method: 'post',
-    data: data
-  })
-}
-
-// 删除人员
-export function delPerson(data) {
-  return axios({
-    url: 'video/person/deletePercon',
-    method: 'post',
-    data: data
-  })
-}
-
-/** 车辆档案列表 **/
-export function getCarList(data) {
-  return axios({
-    url: '/video/car/geCarList',
-    method: 'get',
-    params: data
-  })
-}
-/** 新增车辆档案 **/
-export function addCarBase(data) {
-  return axios({
-    url: '/video/car/addCarBase',
-    method: 'get',
-    params: data
-  })
-}
-/** 车辆档案删除 **/
-export function delCarBase(data) {
-  return axios({
-    url: '/video/car/deleteFromCarBase',
-    method: 'post',
-    data: data
-  })
-}
-/** 车辆档案添加白名单 **/
-export function addCarWhite(data) {
-  return axios({
-    url: 'video/car/addCarWhiteList',
-    method: 'post',
-    data: data
-  })
-}
-
-/** 车辆档案添加黑名单 **/
-export function addCarBlack(data) {
-  return axios({
-    url: 'video/car/addCarBlackList',
-    method: 'post',
-    data: data
-  })
-}
-
-/** 添加 白黑 名单 **/
-export function addWandB(data) {
-  return axios({
-    url: '/video/car/ShowUnSendCar',
-    method: 'post',
-    params: data
-  })
-}
-
-/** 车辆档案白名单 **/
-export function showCarWhite(data) {
-  return axios({
-    url: 'video/car/ShowCarWhiteList',
-    method: 'get',
-    params: data
-  })
-}
-
-/** 车辆档案黑名单 **/
-export function showCarBlack(data) {
-  return axios({
-    url: 'video/car/ShowCarBlackList',
-    method: 'get',
-    params: data
-  })
-}
-
-/** 移出白名单 **/
-export function delCarWhite(data) {
-  return axios({
-    url: 'video/car/deleteFromCarWhiteList',
-    method: 'post',
-    data: data
-  })
-}
-
-/** 移出黑名单 **/
-export function delCarBlack(data) {
-  return axios({
-    url: 'video/car/deleteFromCarBlackList',
-    method: 'post',
-    data: data
-  })
-}
-/* 获取门禁所有 - 人脸门禁 +  */
-export function getFaceGuardTotal(data) {
-  return axios({
-    url: '/video/person/get_person_record_totalpage',
-    method: 'post',
-    data: data
-  })
-}
-
-/* 车辆管理 - 车辆通行 */
-export function getCarPassage(data) {
-  return axios({
-    url: '/video/car/get_car_record',
-    method: 'get',
-    params: data
-  })
-}
-
-/* 车辆管理 - 车辆洗消 */
-export function getCarWash(params) {
-  return axios({
-    url: '/video/accident/accident_record_xixiao',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 车辆管理 - 车辆洗消 - 总数 */
-export function getCarWashTotal(params) {
-  return axios({
-    url: '/video/accident/accident_record_xixiao_totalpage',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 车辆洗消 - 视频回放 */
-export function getCarWashVideo(params) {
-  return axios({
-    url: '/video/video/getVideoRecord',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 车辆烘干 */
-// export function getCarDrying(params) {
-//   return axios({
-//     url: 'http://192.168.1.171:8089/baseTelecomRoom/list',
-//     method: 'get',
-//     params: params
-//   })
-// }
-// 数据查询
-export function getCarDrying(params) {
-  return axios({
-    url: '/video/telecom/listevent',
-    method: 'get',
-    params: params
-  })
-}
-// 温度变化
-export function getCarDryingTemp(params) {
-  return axios({
-    url: '/video/telecom/listeventdetail',
-    method: 'get',
-    params: params
-  })
-}
-
-/* 人员管理 */
-// 档案管理
-export function getPersonFiles(params) {
-  return axios({
-    url: '/video/person/ge_person_list',
-    method: 'post',
-    data: params
-  })
-}
-/** 门禁管理图表 **/
-export function getRecord(data) {
-  return axios({
-    url: '/video/screen/person/count_person_record',
-    method: 'get',
-    params: data
-  })
-}
-
-/** 大门事件 */
-export function getDoorAdmin(params) {
-  return axios({
-    url: '/video/door/ListDoorEvent',
-    method: 'post',
-    data: params
-  })
-}
+/** 
+ * 
+ * 基础资料 
+ * 
+ * */
 
-/** 熏蒸事件 */
-export function getBenconAdmin(params) {
+/** 档案管理 */
+export function baseFarmList(params) {
   return axios({
-    url: '/video/event/xunZhengEvent',
+    url: '/eartag/baseFarmInfo/page',
     method: 'post',
     data: params
   })
 }
 
-/** 卖猪事件 */
-export function getSaleAdmin(params) {
+export function baseFarmAdd(params) {
   return axios({
-    url: '/video/event/maiZhuEvent',
+    url: '/eartag/baseFarmInfo/add',
     method: 'post',
     data: params
   })
 }
 
-/** 生产数据 - ERP 数据分析 - 工作看板 */
-// 汇总信息
-export function getWorkTotal(params) {
+export function baseFarmEdit(params) {
   return axios({
-    url: '/produce/prodWorkPlan/listWorkPlan',
-    method: 'get',
-    params: params
-  })
-}
-// 报警信息
-export function getWorkInfos(params) {
-  return axios({
-    url: '/produce/prodWarningMsg/listWarningMsg',
-    method: 'get',
-    params: params
-  })
-}
-
-/**  生产数据 - ERP 数据分析 - 安全库存报警 */
-export function getSafeInventory(params) {
-  return axios({
-    url: '/produce/prodGoodsWarning/listGoodsWarning',
+    url: '/eartag/baseFarmInfo/update',
     method: 'post',
     data: params
   })
 }
 
-/** 生产数据 - ERP - 生产情况 */
-export function getProductionCondition(params) {
+export function baseFarmDel(params) {
   return axios({
-    url: '/produce/prodProduce/listProducee',
+    url: '/eartag/baseFarmInfo/remove',
     method: 'get',
     params: params
   })
 }
-
-/** 生产数据 - ERP - 重要指标折线图 */
-export function getImportantData(params) {
-  return axios({
-    url: '/produce/prodProduce/listImportance',
-    method: 'post',
-    data: params
-  })
-}
-
-/* ERP - 经营分析 - 成本分析 */
-export function getCostData(params) {
-  return axios({
-    url: '/produce/prodCostStatistics/listCost',
-    method: 'get',
-    params: params
-  })
-}
-
-// 销售情况
-export function getTheSales(params) {
-  return axios({
-    url: '/produce/prodSales/listSales',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 电子秤 */
-// 重量详情
-export function getDayWeight(params) {
-  return axios({
-    url: '/produce/weight/getEveryWeightOnPage',
-    method: 'get',
-    params: params
-  })
-}
-// 近七次
-export function getDaysQuery(params) {
-  return axios({
-    url: '/produce/weight/getWeightLastNtimes',
-    method: 'get',
-    params: params
-  })
-}
-// 本月
-export function getMonthQuery(params) {
-  return axios({
-    url: '/produce/weight/getWeightInOneMonth',
-    method: 'get',
-    params: params
-  })
-}
-// 指定时间
-export function getQuery(params) {
-  return axios({
-    url: '/produce/weight/getWeight',
-    method: 'get',
-    params: params
-  })
-}
-
-/** 违规报警 */
-/* 报警阈值设置 */
-// 常规设置 - list
-export function getRegularList(params) {
-  return axios({
-    url: '/produce/threshold/getThreshold',
-    method: 'get',
-    params: params
-  })
-}
-
-// 常规设置 - 修改
-export function getRegularSet(params) {
-  return axios({
-    url: '/produce/threshold/addThreshold',
-    method: 'post',
-    data: params
-  })
-}
-
-// 报警设置 - 获取电话号码
-export function getAlarmPhones(params) {
-  return axios({
-    url: '/produce/warningPhone/getWarningPhone',
-    method: 'get',
-    params: params
-  })
-}
-
-// 报警设置 - 修改电话号码
-export function postAlarmPhones(params) {
-  return axios({
-    url: '/produce/warningPhone/addWarningPhone',
-    method: 'post',
-    data: params
-  })
-}
-
-// 报警设置 - 获取三个级别报警 table
-export function getAlarmSets(params) {
-  return axios({
-    url: '/produce/warningSet/getWarningSet',
-    method: 'get',
-    params: params
-  })
-}
-
-// 报警设置 - 修改三个级别报警 table
-export function postAlarmSets(params) {
-  return axios({
-    url: '/produce/warningSet/addWarningSet',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 环境监测报警 */
-export function getEnvAlarm(params) {
-  return axios({
-    url: '/produce/warningInfo/listWarningInfoZoology',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 环境排放报警 */
-export function getSewageAlarm(params) {
-  return axios({
-    url: '/produce/warningInfo/listWarningInfoSewage',
-    method: 'post',
-    data: params
-  })
-}
-
-/* 报警信息 */
-// 报警情况占比 - 长条图
-export function getOneWeekAlarm(params) {
-  return axios({
-    url: 'env/alarm/getOneWeekAlarm',
-    method: 'get',
-    params: params
-  })
-}
-
-// 报警情况占比 - 圆环图
-export function getTodayAlarmRate(params) {
-  return axios({
-    url: 'env/alarm/getTodayAlarmRate',
-    method: 'get',
-    params: params
-  })
-}
-
-// 报警信息列表
-export function getAlarmInfo(params) {
-  return axios({
-    url: '/produce/warningInfo/listWarningInfo',
-    method: 'post',
-    data: params
-  })
-}
-
-/**
- * 设备管理
- */
-/* 设备详情 */
-// 设备概况
-export function getDeviceSummer(params) {
-  return axios({
-    url: '/admin/farm/device/getCountDeviceFailureRate',
-    method: 'get',
-    params: params
-  })
-}
-// 设备列表
-export function getDeviceList(params) {
-  return axios({
-    url: '/admin/farm/device/listDevice',
-    method: 'get',
-    params: params
-  })
-}
-
-// 设备新增
-export function postDeviceAdd(params) {
-  return axios({
-    url: '/admin/farm/device/newDevice',
-    method: 'get',
-    params: params
-  })
-}
-
-// 设备编辑
-export function postDeviceEdit(params) {
-  return axios({
-    url: '/admin/farm/device/editDevice',
-    method: 'get',
-    params: params
-  })
-}
-
-// 设备删除
-export function postDeviceDel(params) {
-  return axios({
-    url: '/admin/farm/device/removeDevice',
-    method: 'get',
-    params: params
-  })
-}
-
-export function postPerson(params) {
-  return axios({
-    url: '/video/person/getPersonOpenDoorFail',
-    method: 'post',
-    data: params
-  })
-}

+ 0 - 121
src/views/Alarm/AlarmSet.vue

@@ -1,121 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-11-29 15:06:41
- * @LastEditTime: 2021-12-27 09:12:11
- * @LastEditors: Please set LastEditors
- * @Description: 报警阈值设置
- * @FilePath: \hyyfClient\src\views\Alarm\AlarmSet.vue
--->
-<template>
-  <div class="alarm-set">
-    <div class="top-blank">
-      <div class="left"></div>
-      <div class="right"></div>
-    </div>
-    <div class="regular-set">
-      <div class="title">
-        <set-title :title="titles[0]"></set-title>
-      </div>
-      <div class="regular-left"></div>
-      <div class="right">
-        <regular-form ref="regularRef"></regular-form>
-      </div>
-    </div>
-    <div class="regular-set">
-      <div class="title">
-        <set-title :title="titles[1]"></set-title>
-      </div>
-      <div class="regular-left"></div>
-      <div class="right">
-        <alarm-form ref="alarmFormRef"></alarm-form>
-        <alarm-table ref="alarmTableRef"></alarm-table>
-        <div class="submit-btn">
-          <el-button
-            v-if="hasPerm('alarmSet:edit')"
-            type="primary"
-            @click="handleSubmit"
-          >
-            提交
-          </el-button>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-import SetTitle from "./alarm-set/SetTitle.vue";
-import RegularForm from "./alarm-set/RegularForm.vue";
-import AlarmForm from "./alarm-set/AlarmForm.vue";
-import AlarmTable from "./alarm-set/alarm-table.vue";
-
-export default {
-  components: {
-    SetTitle,
-    RegularForm,
-    AlarmForm,
-    AlarmTable,
-  },
-  data() {
-    return {
-      titles: ["常规设置", "报警设置"],
-    };
-  },
-  methods: {
-    async handleSubmit() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      try {
-        await this.$refs["regularRef"].actionRegular();
-        await this.$refs["alarmFormRef"].addPhonesAction();
-        await this.$refs["alarmTableRef"].addAlarmSets();
-        this.$message.success("设置成功");
-      } catch (err) {
-        this.$message.error("设置失败:" + err.message);
-      } finally {
-        loading.close();
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.top-blank {
-  height: 40px;
-  /* background-color: red; */
-  display: flex;
-}
-.left {
-  width: 239px;
-  height: 100%;
-  border-right: 1px solid #ccc;
-}
-.right {
-  width: calc(100% - 239px);
-  height: 100%;
-  background-color: #fff;
-  padding: 60px 200px 60px 80px;
-}
-/** 常规设置 */
-.regular-set {
-  /* height: 400px; */
-  display: flex;
-  position: relative;
-}
-.title {
-  width: 260px;
-  position: absolute;
-}
-.regular-left {
-  width: 239px;
-  border-right: 1px solid #ccc;
-}
-.submit-btn {
-  margin-top: 40px;
-  display: flex;
-  justify-content: center;
-}
-</style>

+ 0 - 370
src/views/Alarm/AlarmWarn.vue

@@ -1,370 +0,0 @@
-<template>
-  <div class="alarmWarn">
-    <div class="title" :style="{ color: color }">报警情况占比</div>
-    <div class="box-flex">
-      <div class="flex-left">
-        <alarm-pie :pieData="alarmPieData"></alarm-pie>
-      </div>
-      <div class="flex-left">
-        <alarm-bar :barData="alarmBarData"></alarm-bar>
-      </div>
-    </div>
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form
-      :formItems="selectItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    >
-    </x-form>
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="list"
-      :tableItems="tableItems"
-      :shows="tableShows"
-    >
-      <!-- <template #right>
-        <el-button
-          size="mini"
-          type="primary"
-          v-if="hasPerm('video:add')"
-          style="margin-right: 10px"
-          @click="digAll"
-          >批量处理</el-button
-        >
-      </template> -->
-      <template #type="scope">
-        <span v-if="scope.row.type === 1">环境报警</span>
-        <span v-else>设备异常</span>
-      </template>
-      <template #class="scope">
-        <span v-if="scope.row.class === 1">一级</span>
-        <span v-else>二级</span>
-      </template>
-      <template #handler="scope">
-        <span v-if="scope.row.dig">已处理</span>
-        <el-button v-else type="primary" size="mini" @click="dig(scope.row)"
-          >处理</el-button
-        >
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog
-      :title="digType ? '处理' : '批量处理'"
-      :visible.sync="dialogVisible"
-      width="30%"
-    >
-      <div>
-        <el-form
-          ref="form"
-          :model="form"
-          :rules="rules"
-          label-width="100px"
-          size="mini"
-        >
-          <el-form-item label="报警时间" v-if="digType">
-            <span>{{ alarmDig.time }}</span>
-          </el-form-item>
-          <el-form-item label="报警内容" v-if="digType">
-            <el-input
-              type="textarea"
-              :rows="2"
-              readonly
-              :value="alarmDig.content"
-            >
-            </el-input>
-          </el-form-item>
-          <el-form-item label="审批意见" prop="areaId">
-            <el-select v-model="form.areaId">
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="用户名" prop="account">
-            <span>{{ userName }}</span>
-          </el-form-item>
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="onSubmit('form')">确认</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import AlarmPie from "@/views/Alarm/chart/AlarmPie";
-import AlarmBar from "@/views/Alarm/chart/AlarmBar";
-import XForm from "@/components/XForm";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-
-import {
-  getOneWeekAlarm,
-  getTodayAlarmRate,
-  getAlarmInfo,
-} from "@/utils/chenApi.js";
-
-export default {
-  name: "AlarmWarn",
-  components: {
-    AlarmPie,
-    AlarmBar,
-    XForm,
-    NewTable,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      selectItems: [
-        // {
-        //   id: 1,
-        //   type: "select",
-        //   label: "报警类型:",
-        //   placeholder: "请选择报警类型",
-        //   field: "areaId",
-        //   options: [],
-        //   col: 5,
-        // },
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 5,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 7,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "derive",
-        },
-      ],
-      day: 2,
-      title: "报警列表",
-      list: [],
-      tableItems: [
-        {
-          prop: "warningTime",
-          label: "报警时间",
-          minWidth: "100",
-          slotName: "warningTime",
-        },
-        {
-          prop: "warningName",
-          label: "报警类型",
-          minWidth: "100",
-          slotName: "warningName",
-        },
-        {
-          prop: "levelName",
-          label: "报警等级",
-          minWidth: "100",
-          slotName: "levelName",
-        },
-        {
-          prop: "msg",
-          label: "报警内容",
-          minWidth: "100",
-          slotName: "msg",
-        },
-        // {
-        //   label: "handler",
-        //   minWidth: "100",
-        //   slotName: "handler",
-        // },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-        defaultProp: "dig",
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      dialogVisible: false,
-      form: {},
-      rules: {},
-      // 判断是否是批量操作还是单个
-      digType: true,
-      // 单个处理数据
-      alarmDig: {},
-      options: [
-        {
-          label: "略过",
-          value: 1,
-        },
-        {
-          label: "加速处理",
-          value: 2,
-        },
-        {
-          label: "...",
-          value: 3,
-        },
-      ],
-      userName: localStorage.getItem("UserName"),
-      alarmBarData: {},
-      alarmPieData: [], // 报警占比 圆环数据
-    };
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.pageNum = 1;
-      this.initAlarmInfo();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.initAlarmInfo();
-    },
-    init() {},
-    setDay(data) {
-      this.day = data.type;
-      this.pageNum = 1;
-      this.initAlarmInfo();
-    },
-    onClickType(val) {
-      this.day = 4;
-      this.time = val.data.value1;
-      this.pageNum = 1;
-      this.initAlarmInfo();
-    },
-    dig(item) {
-      this.digType = true;
-      this.dialogVisible = true;
-      this.alarmDig = item;
-    },
-    // 批量处理
-    digAll() {
-      this.digType = false;
-    },
-    onSubmit() {},
-    // 获取报警情况占比的 一二三级
-    initOneWeekAlarm() {
-      getOneWeekAlarm({}).then((res) => {
-        if (res.code === 10000) {
-          this.alarmBarData = res.data;
-        }
-      });
-    },
-    // 报警情况占比的 bar 数据
-    initTodayAlarmRate() {
-      getTodayAlarmRate({}).then((res) => {
-        if (res.code === 10000) {
-          this.alarmPieData = res.data;
-        }
-      });
-    },
-    // 报警列表
-    initAlarmInfo() {
-      let params;
-      if (this.day === 4) {
-        params = {
-          startDate: this.time[0],
-          endDate: this.time[1],
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      } else {
-        params = {
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      }
-      getAlarmInfo(params).then((res) => {
-        if (res.code === 10000) {
-          this.list = res.data.records;
-          this.total = res.data.total;
-        } else {
-          this.$message.warning(res.message);
-        }
-      });
-    },
-  },
-  mounted() {
-    this.initOneWeekAlarm(); // bar
-    this.initTodayAlarmRate(); // pie
-    this.initAlarmInfo(); // list
-  },
-};
-</script>
-
-<style scoped>
-.alarmWarn {
-  width: 100%;
-  height: 100%;
-  padding: 20px 20px 0 20px;
-}
-.title {
-  width: 100%;
-  height: 40px;
-  border: 1px solid #ddd;
-  background-color: #f3f3f3;
-  padding-left: 20px;
-  line-height: 40px;
-}
-.box-flex {
-  width: 100%;
-  height: 400px;
-  background-color: #fff;
-  display: flex;
-}
-.flex-left {
-  width: 50%;
-  height: 100%;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-</style>

+ 0 - 209
src/views/Alarm/EnvWarn.vue

@@ -1,209 +0,0 @@
-<template>
-  <div class="envWarn">
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form
-      :formItems="selectItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    >
-    </x-form>
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="list"
-      :tableItems="tableItems"
-      :shows="tableShows"
-    >
-      <!-- <template #right>
-        <el-button size="mini" type="primary">导出数据</el-button>
-      </template> -->
-      <template #handler="scope">
-        <el-button type="text" @click="open(scope.row)">未处理</el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-      :pageNum="pageNum"
-    ></table-footer>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-
-import { getEnvAlarm } from "@/utils/chenApi.js";
-export default {
-  name: "EnvWarn",
-  computed: {
-    ...mapState(["color"]),
-  },
-  components: {
-    XForm,
-    NewTable,
-    TableFooter,
-  },
-  data() {
-    return {
-      day: 2,
-      selectItems: [
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 5,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 7,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      title: "数据列表",
-      list: [],
-      tableItems: [
-        {
-          prop: "uploadTime",
-          label: "环控报警时间",
-          minWidth: "60",
-          slotName: "warningTime",
-        },
-        {
-          prop: "warningTime",
-          label: "平台报警时间",
-          minWidth: "60",
-          slotName: "warningTime",
-        },
-        {
-          prop: "warningName",
-          label: "报警类型",
-          minWidth: "60",
-          slotName: "warningName",
-        },
-        {
-          prop: "levelName",
-          label: "报警等级",
-          minWidth: "60",
-          slotName: "levelName",
-        },
-        {
-          prop: "msg",
-          label: "内容",
-          minWidth: "100",
-          slotName: "msg",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      time: [],
-    };
-  },
-  mounted() {
-    this.init(this.day);
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.pageNum = 1;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    init() {
-      let params;
-      if (this.day === 4) {
-        params = {
-          startDate: this.time[0],
-          endDate: this.time[1],
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      } else {
-        params = {
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      }
-      getEnvAlarm(params).then((res) => {
-        if (res.code === 10000) {
-          this.list = res.data.records;
-          this.total = res.data.total;
-        }
-      });
-    },
-    setDay(data) {
-      this.day = data.type;
-      this.pageNum = 1;
-      this.init();
-    },
-    onClickType(val) {
-      this.day = 4;
-      this.time = val.data.value1;
-      this.pageNum = 1;
-      this.init();
-    },
-    open() {},
-  },
-};
-</script>
-
-<style scoped>
-.envWarn {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-</style>

+ 0 - 229
src/views/Alarm/EventRem.vue

@@ -1,229 +0,0 @@
-<template>
-  <div class="eventRem">
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form :formItems="selectItems" @onClickType="onClickType"></x-form>
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="list"
-      :tableItems="tableItems"
-      :shows="tableShows"
-    >
-      <template #alarmPicture="scope">
-        <img
-          :src="scope.row.alarmPicture"
-          @click="clickImg(scope.row.alarmPicture)"
-          alt="事件提醒"
-          width="140"
-        />
-      </template>
-      <template #handler="scope">
-        <el-button type="text" @click="open(scope.row)">视频回看</el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    ></table-footer>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="事件提醒图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="事件提醒图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-import { getEventList, getFaceToken } from "../../utils/api";
-import { getCarWashVideo } from "../../utils/chenApi";
-
-export default {
-  name: "EventRem",
-  computed: {
-    ...mapState(["color", "ip"]),
-  },
-  components: {
-    XForm,
-    NewTable,
-    TableFooter,
-  },
-  data() {
-    return {
-      day: 2,
-      selectItems: [
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 7,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      title: "数据列表",
-      list: [],
-      tableItems: [
-        {
-          prop: "alarmDate",
-          label: "时间",
-          minWidth: "100",
-          slotName: "alarmDate",
-        },
-        {
-          prop: "alarmPosition",
-          label: "位置",
-          minWidth: "100",
-          slotName: "alarmPosition",
-        },
-        {
-          prop: "alarmPicture",
-          label: "图片",
-          minWidth: "100",
-          slotName: "alarmPicture",
-        },
-        {
-          label: "操作",
-          minWidth: "100",
-          slotName: "handler",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      alarmStartDateString: "",
-      alarmEndDateString: "",
-      rtsp: "",
-      videoVisible: false,
-      dialogVisible: false,
-      imgUrl: "", // 点击图片后放大的图片路径
-    };
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    init() {
-      let params = {
-        alarmStartDateString: this.alarmStartDateString
-          ? this.alarmStartDateString + " 00:00:00"
-          : "",
-        alarmEndDateString: this.alarmEndDateString
-          ? this.alarmEndDateString + " 23:59:59"
-          : "",
-        pageNum: this.pageNum,
-        pageSize: this.pageSize,
-      };
-      getEventList(params).then(async (res) => {
-        if (res.code === 0) {
-          const result = JSON.parse(res.data.result);
-          this.list = result.data.pageData;
-          console.log(this.list);
-          this.total = parseInt(res.total);
-          // const { token } = await getFaceToken();
-          this.list.forEach((item) => {
-            item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-          });
-        }
-      });
-    },
-    setDay(data) {
-      this.day = data.type;
-    },
-    onClickType(data) {
-      console.log(data);
-      if (data.type === "search") {
-        if (data.data.value1) {
-          this.alarmStartDateString = data.data.value1[0];
-          this.alarmEndDateString = data.data.value1[1];
-        }
-        this.init();
-      }
-    },
-    open(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        } else {
-          this.$message.error("视频获取失败");
-        }
-      });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-  },
-  mounted() {
-    this.init();
-  },
-};
-</script>
-
-<style scoped>
-.eventRem {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-</style>

+ 0 - 13
src/views/Alarm/Outage.vue

@@ -1,13 +0,0 @@
-<template>
-  <div>断电报警</div>
-</template>
-
-<script>
-export default {
-  name: "Outage"
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 202
src/views/Alarm/SewageWarn.vue

@@ -1,202 +0,0 @@
-<template>
-  <div class="sewageWarn">
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form
-      :formItems="selectItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    ></x-form>
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="list"
-      :tableItems="tableItems"
-      :shows="tableShows"
-    >
-      <template #right>
-        <!--        <el-button size="mini" type="primary">导出数据</el-button>-->
-      </template>
-      <template #handler="scope">
-        <el-button type="text" @click="open(scope.row)">未处理</el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    ></table-footer>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-
-import { getSewageAlarm } from "@/utils/chenApi.js";
-
-export default {
-  name: "SewageWarn",
-  computed: {
-    ...mapState(["color"]),
-  },
-  components: {
-    XForm,
-    NewTable,
-    TableFooter,
-  },
-  data() {
-    return {
-      day: 2,
-      selectItems: [
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 5,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 7,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      title: "数据列表",
-      list: [],
-      tableItems: [
-        {
-          prop: "warningTime",
-          label: "时间",
-          minWidth: "60",
-          slotName: "warningTime",
-        },
-        {
-          prop: "warningName",
-          label: "报警类型",
-          minWidth: "60",
-          slotName: "warningName",
-        },
-        {
-          prop: "levelName",
-          label: "报警等级",
-          minWidth: "60",
-          slotName: "levelName",
-        },
-        {
-          prop: "msg",
-          label: "内容",
-          minWidth: "100",
-          slotName: "msg",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      time: [],
-    };
-  },
-  mounted() {
-    this.init(this.day);
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.pageNum = 1;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    init() {
-      let params;
-      if (this.day === 4) {
-        params = {
-          startDate: this.time[0],
-          endDate: this.time[1],
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      } else {
-        params = {
-          type: this.day,
-          current: this.pageNum,
-          size: this.pageSize,
-        };
-      }
-      getSewageAlarm(params).then((res) => {
-        if (res.code === 10000) {
-          this.list = res.data.records;
-          this.total = res.data.total;
-        }
-      });
-    },
-    setDay(data) {
-      this.day = data.type;
-      this.pageNum = 1;
-      this.init();
-    },
-    onClickType(val) {
-      this.day = 4;
-      this.time = val.data.value1;
-      this.pageNum = 1;
-      this.init();
-    },
-    open() {},
-  },
-};
-</script>
-
-<style scoped>
-.sewageWarn {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-</style>

+ 0 - 204
src/views/Alarm/ViolationUser.vue

@@ -1,204 +0,0 @@
-<template>
-  <div class="violation">
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form
-      :formItems="selectItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    ></x-form>
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="list"
-      :tableItems="tableItems"
-      :shows="tableShows"
-    >
-      <!--      <template #right>-->
-      <!--        <el-button size="mini" type="primary">导出数据</el-button>-->
-      <!--      </template>-->
-      <template #recordImage="scope">
-        <img
-          :src="scope.row.recordImage"
-          @click="clickImg(scope.row.recordImage)"
-          alt="人员照片"
-          width="140"
-        />
-      </template>
-      <template #handler="scope">
-        <el-button type="text" @click="open(scope.row)">加入白名单</el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    ></table-footer>
-    <el-dialog
-      title="人员违规报警图片"
-      :visible.sync="dialogVisible"
-      width="25%"
-      style="text-align:center"
-    >
-      <img :src="imgUrl" alt="人员违规报警图片" height="50%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-import { postPerson } from "@/utils/chenApi.js";
-export default {
-  name: "ViolationUser",
-  computed: {
-    ...mapState(["color", "ip"]),
-  },
-  components: {
-    XForm,
-    NewTable,
-    TableFooter,
-  },
-  data() {
-    return {
-      day: 1,
-      selectItems: [
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 7,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      title: "数据列表",
-      list: [],
-      tableItems: [
-        {
-          prop: "swingTime",
-          label: "时间",
-          minWidth: "100",
-          slotName: "swingTime",
-        },
-        {
-          prop: "recordImage",
-          label: "照片",
-          minWidth: "100",
-          slotName: "recordImage",
-        },
-        {
-          prop: "deviceName",
-          label: "进入区域",
-          minWidth: "100",
-          slotName: "deviceName",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      form: {},
-      dialogVisible: false,
-      imgUrl: "", // 点击图片后放大的图片路径
-    };
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    init() {
-      const params = {
-        pageNum: this.pageNum,
-        pageSize: this.pageSize,
-        startSwingTime: this.form.time ? this.form.time[0] : "",
-        endSwingTime: this.form.time ? this.form.time[1] + " 23:59:59" : "",
-      };
-      postPerson(params).then((res) => {
-        if (res.code === 0) {
-          this.total = parseInt(res.total);
-          this.list = res.data.data.pageData;
-          this.list.forEach((item) => {
-            item.recordImage = `${this.ip}/video/picture/get?alarmPicture=${item.recordImage}`;
-          });
-        }
-      });
-    },
-    setDay(data) {
-      this.day = data.type;
-      this.form.time = [];
-      this.init();
-    },
-    onClickType(val) {
-      this.day = 0;
-      this.form.time = val.data.value1;
-      if (!this.form.time) {
-        this.$message.warning("请选择时间再查询");
-        return;
-      }
-      this.init();
-    },
-    open() {},
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-  },
-  mounted() {
-    this.init();
-  },
-};
-</script>
-
-<style scoped>
-.violation {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-</style>

+ 0 - 220
src/views/Alarm/alarm-set/AlarmForm.vue

@@ -1,220 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-11-29 16:41:38
- * @LastEditTime: 2021-12-15 10:12:58
- * @LastEditors: Please set LastEditors
- * @Description: 报警设置的 各个报警号码
- * @FilePath: \hyyfClient\src\views\Alarm\alarm-set\AlarmForm.vue
--->
-<template>
-  <div class="alarm-form">
-    <el-form
-      :model="alarmForm"
-      ref="alarmForm"
-      label-width="140px"
-      class="demo-dynamic"
-    >
-      <!-- 一级报警 -->
-      <el-form-item prop="first" label="一级报警:">
-        <el-input
-          v-model="alarmForm.first"
-          style="width: 200px"
-          disabled
-        ></el-input>
-      </el-form-item>
-
-      <!-- 二级报警 -->
-      <el-form-item prop="second" label="二级报警:">
-        <el-input v-model="alarmForm.second" style="width: 200px" disabled>
-        </el-input>
-      </el-form-item>
-      <div class="rows">
-        <el-form-item
-          v-for="(domain, index) in alarmForm.secondPhones"
-          label="接收号码:"
-          :prop="'secondPhones.' + index + '.phone'"
-          :key="domain.key"
-        >
-          <el-input
-            v-model="alarmForm.secondPhones[index].phone"
-            style="width: 200px"
-          >
-          </el-input>
-          <!-- 即时删除 -->
-          <div class="del-btn">
-            <el-button @click="removeItem(domain, 'secondPhones')"
-              >删除</el-button
-            >
-          </div>
-        </el-form-item>
-        <div class="add-btn">
-          <el-button @click.prevent="addPhones('secondPhones')">新增</el-button>
-        </div>
-      </div>
-
-      <!-- 三级报警 -->
-      <el-form-item prop="third" label="三级报警:">
-        <el-input v-model="alarmForm.third" style="width: 200px" disabled>
-        </el-input>
-      </el-form-item>
-      <div class="rows">
-        <el-form-item
-          v-for="(domain, index) in alarmForm.thirdPhones"
-          label="接收号码:"
-          :prop="'thirdPhones.' + index + '.phone'"
-          :key="domain.key"
-          :rules="{
-            pattern: /^[1][3,4,5,7,8][0-9]{9}$/,
-            message: '请输入正确的手机号',
-            trigger: 'blur',
-          }"
-        >
-          <el-input
-            v-model="alarmForm.thirdPhones[index].phone"
-            style="width: 200px"
-          >
-          </el-input>
-          <!-- 即时删除 -->
-          <div class="del-btn">
-            <el-button @click="removeItem(domain, 'thirdPhones')"
-              >删除</el-button
-            >
-          </div>
-        </el-form-item>
-        <div class="add-btn">
-          <el-button @click.prevent="addPhones('thirdPhones')">新增</el-button>
-        </div>
-      </div>
-    </el-form>
-  </div>
-</template>
-<script>
-import { getAlarmPhones, postAlarmPhones } from "utils/chenApi";
-export default {
-  data() {
-    return {
-      alarmForm: {
-        secondPhones: [
-          {
-            phone: "",
-            key: 0,
-          },
-        ],
-        thirdPhones: [
-          {
-            phone: "",
-            key: 0,
-          },
-        ],
-        first: "平台消息",
-        second: "短信通知",
-        third: "电话通知",
-      },
-      secondId: "",
-      thirdId: "",
-    };
-  },
-  mounted() {
-    this.initGetPhones();
-  },
-  methods: {
-    addPhones(value) {
-      this.alarmForm[value].push({
-        phone: "",
-        key: this.alarmForm[value].length,
-      });
-    },
-    initGetPhones() {
-      getAlarmPhones({}).then(({ code, data }) => {
-        if (code === 10000) {
-          const secondPhones = data.two.phone.split(",");
-          this.alarmForm.secondPhones = [];
-          secondPhones.forEach((item) => {
-            if (item) {
-              this.alarmForm.secondPhones.push({
-                phone: item,
-                key: this.alarmForm.secondPhones.length,
-              });
-            }
-          });
-          this.secondId = data.two.id;
-          const thirdPhones = data.three.phone.split(",");
-          this.alarmForm.thirdPhones = [];
-          thirdPhones.forEach((item) => {
-            if (item) {
-              this.alarmForm.thirdPhones.push({
-                phone: item,
-                key: this.alarmForm.thirdPhones.length,
-              });
-            }
-          });
-          this.thirdId = data.three.id;
-        }
-      });
-    },
-    addPhonesAction() {
-      this.$refs["alarmForm"].validate((valid) => {
-        if (valid) {
-          const secondPhones = this.alarmForm.secondPhones.reduce(
-            (prev, item) => {
-              return prev + item.phone + ",";
-            },
-            ""
-          );
-          const thirdPhones = this.alarmForm.thirdPhones.reduce(
-            (prev, item) => {
-              return prev + item.phone + ",";
-            },
-            ""
-          );
-          postAlarmPhones([
-            {
-              id: this.secondId || undefined,
-              farmId: Number(localStorage.getItem("lastFarmId")),
-              wraningName: "二级报警",
-              phone: secondPhones,
-              level: 2,
-            },
-            {
-              id: this.thirdId || undefined,
-              farmId: Number(localStorage.getItem("lastFarmId")),
-              wraningName: "三级报警",
-              phone: thirdPhones,
-              level: 3,
-            },
-          ]).then((res) => {
-            console.log(res);
-            if (res.code === 10000) {
-              this.initGetPhones();
-            }
-          });
-        } else {
-          throw new Error("手机号有误");
-        }
-      });
-    },
-    // 删除
-    removeItem(item, formItem) {
-      let index = this.alarmForm[formItem].indexOf(item);
-      if (index !== -1) {
-        this.alarmForm[formItem].splice(index, 1);
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.rows {
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: 90px;
-}
-.add-btn {
-  padding-left: 20px;
-  margin-bottom: 20px;
-}
-.del-btn {
-  display: inline-block;
-  padding-left: 5px;
-}
-</style>

+ 0 - 173
src/views/Alarm/alarm-set/RegularForm.vue

@@ -1,173 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-11-29 15:55:20
- * @LastEditTime: 2021-12-23 14:13:45
- * @LastEditors: Please set LastEditors
- * @Description: 常规设置的每一项
- * @FilePath: \hyyfClient\src\views\Alarm\alarm-set\RegularForm.vue
--->
-<template>
-  <div class="regular-form">
-    <el-form :model="regularForm" label-width="200px">
-      <div class="row">
-        <el-form-item label="高温报警阈值:" prop="maxTem">
-          <el-input style="width: 200px" v-model="regularForm.maxTem">
-          </el-input>
-          <span class="margin-left">℃</span>
-        </el-form-item>
-        <el-form-item label="天气高温报警阈值:" prop="weatherMaxTem">
-          <el-input style="width: 200px" v-model="regularForm.weatherMaxTem">
-          </el-input>
-          <span class="margin-left-left">℃</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="低温报警阈值:" prop="minTem">
-          <el-input style="width: 200px" v-model="regularForm.minTem">
-          </el-input>
-          <span class="margin-left">℃</span>
-        </el-form-item>
-        <el-form-item label="天气低温报警阈值:" prop="weatherMinTem">
-          <el-input style="width: 200px" v-model="regularForm.weatherMinTem">
-          </el-input>
-          <span class="margin-left-left">℃</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="烘干高温报警阈值:" prop="benconValue">
-          <el-input style="width: 200px" v-model="regularForm.benconValue">
-          </el-input>
-          <span class="margin-left-left">℃</span>
-        </el-form-item>
-        <el-form-item label="化学需氧量阈值:" prop="cod">
-          <el-input style="width: 200px" v-model="regularForm.cod"> </el-input>
-          <span class="margin-left">mg/L</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="烘干持续时长报警阈值:" prop="benconTime">
-          <el-input style="width: 200px" v-model="regularForm.benconTime">
-          </el-input>
-          <span class="margin-left-left">分钟</span>
-        </el-form-item>
-        <el-form-item label="氨氮量阈值:" prop="ammonia">
-          <el-input style="width: 200px" v-model="regularForm.ammonia">
-          </el-input>
-          <span class="margin-left">mg/L</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="高湿度报警阈值:" prop="maxHum">
-          <el-input style="width: 200px" v-model="regularForm.maxHum">
-          </el-input>
-          <span class="margin-left">%</span>
-        </el-form-item>
-        <el-form-item label="总磷量阈值:" prop="phosphorus">
-          <el-input style="width: 200px" v-model="regularForm.phosphorus">
-          </el-input>
-          <span class="margin-left">mg/L</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="低湿度报警阈值:" prop="minHum">
-          <el-input style="width: 200px" v-model="regularForm.minHum">
-          </el-input>
-          <span class="margin-left">%</span>
-        </el-form-item>
-        <el-form-item label="总氮量阈值:" prop="nitrogen">
-          <el-input style="width: 200px" v-model="regularForm.nitrogen">
-          </el-input>
-          <span class="margin-left">mg/L</span>
-        </el-form-item>
-      </div>
-
-      <div class="row">
-        <el-form-item label="累计流量阈值:" prop="totalFlow">
-          <el-input style="width: 200px" v-model="regularForm.totalFlow">
-          </el-input>
-          <span class="margin-left">T/HT</span>
-        </el-form-item>
-        <el-form-item label="ph值:" prop="ph">
-          <el-input style="width: 200px" v-model="regularForm.ph"> </el-input>
-          <div class="margin-left block"></div>
-        </el-form-item>
-      </div>
-      <div class="row">
-        <el-form-item label="瞬时流量:" prop="flow">
-          <el-input style="width: 200px" v-model="regularForm.flow"> </el-input>
-          <span class="margin-left">T/HT</span>
-        </el-form-item>
-      </div>
-    </el-form>
-  </div>
-</template>
-<script>
-import { getRegularList, getRegularSet } from "utils/chenApi.js";
-export default {
-  data() {
-    return {
-      regularForm: {},
-    };
-  },
-  mounted() {
-    this.initRegular();
-  },
-  methods: {
-    initRegular() {
-      getRegularList({}).then(({ code, data }) => {
-        this.regularForm = {
-          maxTem: "未设定",
-          minTem: "未设定",
-          maxHum: "未设定",
-          minHum: "未设定",
-          totalFlow: "未设定",
-          COD: "未设定",
-          ammonia: "未设定",
-          phosphorus: "未设定",
-          nitrogen: "未设定",
-          ph: "未设定",
-          flow: "未设定",
-          weatherMaxTem: "未设定",
-          weatherMinTem: "未设定",
-          benconTime: "未设定",
-          benconValue: "未设定",
-        };
-        if (code === 10000) {
-          // this.regularForm = { ...regularForm, ...data };
-          for (const key in data) {
-            this.regularForm[key] = data[key] ?? "未设定";
-          }
-        }
-      });
-    },
-    actionRegular() {
-      getRegularSet({ ...this.regularForm }).then(() => {
-        this.initRegular();
-      });
-    },
-  },
-};
-</script>
-<style scoped>
-.row {
-  display: flex;
-  justify-content: space-between;
-}
-.margin-left {
-  padding-left: 20px;
-}
-.margin-left-left {
-  padding-left: 20px;
-  margin-right: 20px;
-}
-.block {
-  display: inline-block;
-  height: 10px;
-  width: 55px;
-}
-</style>

+ 0 - 48
src/views/Alarm/alarm-set/SetTitle.vue

@@ -1,48 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-11-29 15:21:54
- * @LastEditTime: 2021-11-29 15:53:33
- * @LastEditors: Please set LastEditors
- * @Description: 报警阈值设置 - 标题
- * @FilePath: \hyyfClient\src\views\Alarm\alarm-set\SetTitle.vue
--->
-<template>
-  <div class="set-title">
-    <div class="label"></div>
-    <span>{{ title }}</span>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    title: {
-      type: String,
-      required: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.set-title {
-  background: url("~assets/images/alarm/u5665.svg") no-repeat;
-  background-size: 100% 100%;
-  height: 50px;
-  color: #fff;
-  font-size: 20px;
-  line-height: 48px;
-  padding-left: 30px;
-  position: relative;
-}
-.label {
-  display: inline-block;
-  background: url("~assets/images/alarm/label.svg") no-repeat;
-  background-size: 100% 100%;
-  width: 20px;
-  height: 20px;
-  position: absolute;
-  top: calc(50% - 11px);
-}
-.set-title > span {
-  margin-left: 25px;
-}
-</style>

+ 0 - 141
src/views/Alarm/alarm-set/alarm-table.vue

@@ -1,141 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-11-29 17:27:07
- * @LastEditTime: 2021-12-05 12:01:20
- * @LastEditors: Please set LastEditors
- * @Description: 报警设置的表格
- * @FilePath: \hyyfClient\src\views\Alarm\alarm-set\alarm-table.vue
--->
-<template>
-  <div class="alarm-table">
-    <el-table
-      :data="tableData"
-      :span-method="objectSpanMethod"
-      border
-      style="width: 100%; margin-top: 20px"
-    >
-      <el-table-column prop="major" label="大项" width="180"></el-table-column>
-      <el-table-column prop="content" label="内容"></el-table-column>
-      <el-table-column label="一级">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.firstLevel"
-            active-color="#13ce66"
-            inactive-color="#ccc"
-          >
-          </el-switch>
-        </template>
-      </el-table-column>
-      <el-table-column label="二级">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.secondLevel"
-            active-color="#13ce66"
-            inactive-color="#ccc"
-          >
-          </el-switch>
-        </template>
-      </el-table-column>
-      <el-table-column prop="amount3" label="三级">
-        <template slot-scope="scope">
-          <el-switch
-            v-model="scope.row.thirdLevel"
-            active-color="#13ce66"
-            inactive-color="#ccc"
-          >
-          </el-switch>
-        </template>
-      </el-table-column>
-    </el-table>
-  </div>
-</template>
-<script>
-import { getAlarmSets, postAlarmSets } from "utils/chenApi";
-export default {
-  data() {
-    return {
-      tableData: [],
-      value: false,
-    };
-  },
-  mounted() {
-    this.initAlarmSets();
-  },
-  methods: {
-    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
-      const smallItem = {
-        rowspan: 0,
-        colspan: 0,
-      };
-      if (columnIndex === 0) {
-        if (rowIndex < 2) {
-          if (rowIndex === 0) {
-            return {
-              rowspan: 2,
-              colspan: 1,
-            };
-          } else {
-            return smallItem;
-          }
-        } else if (rowIndex < 6) {
-          if (rowIndex === 2) {
-            return {
-              rowspan: 4,
-              colspan: 1,
-            };
-          } else {
-            return smallItem;
-          }
-        } else if (rowIndex < 11) {
-          if (rowIndex === 6) {
-            return {
-              rowspan: 5,
-              colspan: 1,
-            };
-          } else {
-            return smallItem;
-          }
-        } else if (rowIndex < 14) {
-          if (rowIndex === 11) {
-            return {
-              rowspan: 3,
-              colspan: 1,
-            };
-          } else {
-            return smallItem;
-          }
-        } else {
-          if (rowIndex === 14) {
-            return {
-              rowspan: 4,
-              colspan: 1,
-            };
-          } else {
-            return smallItem;
-          }
-        }
-      }
-    },
-    initAlarmSets() {
-      getAlarmSets({}).then(({ code, data }) => {
-        if (code === 10000) {
-          this.tableData = data;
-        }
-      });
-    },
-    async addAlarmSets() {
-      const farmId = Number(localStorage.getItem("lastFarmId"));
-      const params = this.tableData.map((item) => {
-        return {
-          ...item,
-          farmId,
-        };
-      });
-      const res = await postAlarmSets(params);
-      console.log(res);
-      this.initAlarmSets();
-    },
-  },
-};
-</script>
-<style scoped></style>

+ 0 - 168
src/views/Alarm/chart/AlarmBar.vue

@@ -1,168 +0,0 @@
-<template>
-  <div id="alarm-bar" style="width: 100%; height: 100%;"></div>
-</template>
-
-<script>
-import echarts from "echarts";
-import { mapState } from "vuex";
-export default {
-  name: "AlarmBar",
-  computed: {
-    ...mapState(["color"]),
-  },
-  props: {
-    barData: {
-      type: Object,
-      default: () => ({
-        one: 0,
-        two: 0,
-        three: 0,
-      }),
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    barData: {
-      handler() {
-        this.myChart.clear();
-        this.init();
-      },
-      deep: true,
-    },
-  },
-  methods: {
-    init() {
-      var salvProName = ["一级", "二级", "三级"];
-      var salvProValue = [
-        this.barData.one,
-        this.barData.two,
-        this.barData.three,
-      ];
-      let options = {
-        title: {
-          text: "近7日数据",
-          left: "center",
-          textStyle: {
-            fontSize: 16,
-          },
-          top: "5%",
-        },
-        grid: {
-          left: "2%",
-          right: "2%",
-          bottom: "2%",
-          top: "5%",
-          containLabel: true,
-        },
-        tooltip: {
-          trigger: "axis",
-          axisPointer: {
-            type: "none",
-          },
-          formatter: function(params) {
-            return params[0].name + " : " + params[0].value;
-          },
-        },
-        xAxis: {
-          show: false,
-          type: "value",
-        },
-        yAxis: [
-          {
-            type: "category",
-            inverse: true,
-            axisLabel: {
-              show: true,
-              textStyle: {
-                color: "#111",
-              },
-            },
-            splitLine: {
-              show: false,
-            },
-            axisTick: {
-              show: false,
-            },
-            axisLine: {
-              show: false,
-            },
-            data: salvProName,
-          },
-          {
-            type: "category",
-            inverse: true,
-            axisTick: "none",
-            axisLine: "none",
-            show: true,
-            axisLabel: {
-              textStyle: {
-                color: "#111",
-                fontSize: "12",
-              },
-            },
-            data: salvProValue,
-          },
-        ],
-        series: [
-          {
-            name: "值",
-            type: "bar",
-            zlevel: 1,
-            itemStyle: {
-              normal: {
-                barBorderRadius: 30,
-                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
-                  {
-                    offset: 0,
-                    color: this.color,
-                  },
-                  {
-                    offset: 1,
-                    color: this.color,
-                  },
-                ]),
-              },
-            },
-            barWidth: 20,
-            data: salvProValue,
-          },
-          {
-            name: "背景",
-            type: "bar",
-            barWidth: 20,
-            barGap: "-100%",
-            data: [],
-            itemStyle: {
-              normal: {
-                color: "rgba(24,31,68,1)",
-                barBorderRadius: 30,
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("alarm-bar"));
-    this.init();
-    let that = this;
-    window.addEventListener("resize", function() {
-      that.myChart.resize();
-    });
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 161
src/views/Alarm/chart/AlarmPie.vue

@@ -1,161 +0,0 @@
-<template>
-  <div id="alarm-pie" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-export default {
-  name: "AlarmPie",
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    pieData: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  methods: {
-    init() {
-      let title = "今日报警总量";
-      let color = [
-        "#0E7CE2",
-        "#FF8352",
-        "#E271DE",
-        "#F8456B",
-        "#00FFFF",
-        "#4AEAB0",
-      ];
-      // let echartData = [
-      //   {
-      //     name: "环境报警",
-      //     value: "3720",
-      //   },
-      //   {
-      //     name: "人员违规",
-      //     value: "2920",
-      //   },
-      //   {
-      //     name: "环境监测",
-      //     value: "2200",
-      //   },
-      //   {
-      //     name: "污水排放",
-      //     value: "1420",
-      //   },
-      //   {
-      //     name: "设备异常",
-      //     value: "1420",
-      //   },
-      // ];
-      let echartData = this.pieData;
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ",");
-      };
-      let total = echartData.reduce((a, b) => {
-        return a + b.value * 1;
-      }, 0);
-      let options = {
-        title: [
-          {
-            text:
-              "{name|" + title + "}\n{val|" + formatNumber(total) + "} " + "条",
-            top: "center",
-            left: "26%",
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: "normal",
-                  color: "#666666",
-                  padding: [10, 0],
-                  textAlign: "center",
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: "bold",
-                  color: "#333333",
-                },
-              },
-            },
-          },
-        ],
-        color: color,
-        tooltip: {
-          trigger: "item",
-          formatter: function(parms) {
-            var str =
-              parms.marker +
-              "" +
-              parms.data.name +
-              "</br>" +
-              "数量:" +
-              parms.data.value +
-              "条" +
-              "</br>" +
-              "占比:" +
-              parms.percent +
-              "%";
-            return str;
-          },
-        },
-        legend: {
-          orient: "vertical",
-          left: "65%",
-          align: "left",
-          top: "middle",
-          icon: "circle",
-          itemGap: 20,
-          textStyle: {
-            color: "#8C8C8C",
-          },
-        },
-        series: [
-          {
-            type: "pie",
-            radius: ["60%", "75%"],
-            center: ["35%", "50%"],
-            data: echartData,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: "#fff",
-                borderWidth: 5,
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("alarm-pie"));
-    this.init();
-    let that = this;
-    // 监听resize
-    window.addEventListener("resize", function() {
-      that.myChart.resize();
-    });
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    pieData: {
-      handler(newVal) {
-        console.log(newVal);
-        this.myChart.clear();
-        this.init();
-      },
-    },
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 309
src/views/BioSafety/BenconAdmin.vue

@@ -1,309 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-17 15:50:33
- * @LastEditTime: 2021-12-24 14:37:56
- * @LastEditors: Please set LastEditors
- * @Description: 大门事件
- * @FilePath: \hyyfClient\src\views\BioSafety\DoorAdmin.vue
--->
-<template>
-  <div class="door-admin">
-    <!-- 筛选条件 -->
-    <query-conditions
-      :defaultEmit="true"
-      :formItems="formItems"
-      :propFormData="propFormData"
-      @getQueryParams="handleQuery"
-    ></query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="535"
-    >
-      <template v-slot:alarmPicture="slotProps">
-        <img
-          :src="slotProps.row.alarmPicture"
-          @click="clickImg(slotProps.row.alarmPicture)"
-          alt="死猪图片"
-          width="100%"
-        />
-      </template>
-
-      <!-- 回放按钮 -->
-      <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)">
-          查看回放
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="死猪图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-
-import { formItems, propFormData } from "./doorAdmin/queryCondition.config";
-import { title, tableItems, tableShows } from "./doorAdmin/table.config";
-import { mapState } from "vuex";
-import { timeDate } from "../../utils/index";
-
-import {
-  getBenconAdmin,
-  // getCarWashTotal,
-  getCarWashVideo,
-} from "../../utils/chenApi";
-
-export default {
-  name: "DeadPig",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      dialogVisible: false,
-      imgUrl: "",
-      rtsp: "",
-      videoVisible: false,
-    };
-  },
-  mounted() {
-    this.formItems = formItems;
-    this.propFormData = propFormData;
-    this.propFormData.time = [
-      timeDate(new Date().getTime()),
-      timeDate(new Date().getTime()),
-    ];
-    this.title = title;
-    this.tableItems = tableItems;
-    this.tableShows = tableShows;
-    this.pigManage();
-    this.pigTotal();
-  },
-  methods: {
-    // 获取查询条件
-    handleQuery(params) {
-      this.params = params;
-      this.pageNum = 1;
-      this.pigManage();
-      this.pigTotal();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      // this.init();
-      this.pageNum = 1;
-      this.pigManage();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      // this.init();
-      this.pigManage();
-    },
-    // 死猪管理
-    pigManage() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime() - 1000 * 60 * 60 * 24),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-      };
-      getBenconAdmin(queryParams).then(async (res) => {
-        loading.close();
-        if (res && res.code === 0) {
-          const result = JSON.parse(res.data.result);
-          this.listData = result.data.pageData;
-          this.listData.forEach((item) => {
-            item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-          });
-          this.total = parseInt(res.total);
-        } else {
-          res && this.$message.warning(res.message);
-        }
-      });
-    },
-    // 死猪管理 - 总数
-    pigTotal() {
-      // if (!this.params.time) {
-      //   this.params.time = [
-      //     timeDate(new Date().getTime() - 1000 * 60 * 60 * 24),
-      //     timeDate(new Date().getTime()),
-      //   ];
-      // }
-      // let queryParams = {
-      //   orgCodeList: [],
-      //   nodeCodeList: [
-      //     "1002874$1$0$0",
-      //     "1002875$1$0$0",
-      //     "1002876$1$0$0",
-      //     "1002877$1$0$0",
-      //     "1002878$1$0$0",
-      //     "1002879$1$0$0",
-      //     "1002880$1$0$0",
-      //     "1002881$1$0$0",
-      //     "1002882$1$0$0",
-      //     "1002883$1$0$0",
-      //     "1002884$1$0$0",
-      //     "1002885$1$0$0",
-      //     "1002886$1$0$0",
-      //     "1002887$1$0$0",
-      //     "1002888$1$0$0",
-      //     "1002889$1$0$0",
-      //     "1002890$1$0$0",
-      //     "1002891$1$0$0",
-      //     "1002892$1$0$0",
-      //     "1002893$1$0$0",
-      //     "1002894$1$0$0",
-      //     "1002895$1$0$0",
-      //     "1002896$1$0$0",
-      //     "1002897$1$0$0",
-      //     "1002898$1$0$0",
-      //     "1002899$1$0$0",
-      //     "1002900$1$0$0",
-      //     "1002901$1$0$0",
-      //     "1002902$1$0$0",
-      //     "1002903$1$0$0",
-      //     "1002904$1$0$0",
-      //     "1002905$1$0$0",
-      //     "1002906$1$0$0",
-      //     "1002907$1$0$0",
-      //     "1002908$1$0$0",
-      //     "1002909$1$0$0",
-      //     "1002910$1$0$0",
-      //     "1002911$1$0$0",
-      //     "1002912$1$0$0",
-      //     "1002913$1$0$0",
-      //     "1002939$1$0$0",
-      //     "1002939$1$0$1",
-      //     "1002939$1$0$2",
-      //     "1002939$1$0$3",
-      //     "1002939$1$0$4",
-      //     "1002939$1$0$5",
-      //     "1002939$1$0$6",
-      //     "1002939$1$0$7",
-      //     "1002939$1$0$8",
-      //     "1002939$1$0$9",
-      //     "1002940$1$0$0",
-      //     "1002940$1$0$1",
-      //     "1002940$1$0$2",
-      //     "1002940$1$0$3",
-      //     "1002940$1$0$4",
-      //     "1002940$1$0$5",
-      //     "1002940$1$0$6",
-      //     "1002940$1$0$7",
-      //     "1002939$1$0$10",
-      //     "1002939$1$0$11",
-      //     "1002939$1$0$12",
-      //     "1002939$1$0$13",
-      //     "1002939$1$0$14",
-      //     "1002939$1$0$15",
-      //   ],
-      //   deviceCategory: 1,
-      //   alarmStartDateString: this.params.time[0] + " 00:00:00",
-      //   alarmEndDateString: this.params.time[1] + " 23:59:59",
-      //   alarmType: 303,
-      //   dbType: 0,
-      // };
-      // getCarWashTotal(queryParams).then((res) => {
-      //   this.total = JSON.parse(res.result).data.value;
-      // });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 大门回放
-    clickEvent(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        } else {
-          this.$message.error("视频获取失败");
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.door-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 821
src/views/BioSafety/CarAdmin.vue

@@ -1,821 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-13 17:52:31
- * @LastEditTime: 2021-12-30 17:39:41
- * @LastEditors: Please set LastEditors
- * @Description: 生物安全 - 车辆管理
- * @FilePath: \hyyfClient\src\views\BioSafety\CarAdmin.vue
--->
-<template>
-  <div class="car-admin">
-    <head-btns
-      :btnNames="btnNames"
-      :btnSelected="btnSelected"
-      @btnSelected="getBtnSelected"
-    >
-    </head-btns>
-
-    <!-- 筛选条件 -->
-    <query-conditions
-      v-if="btnSelected === 2 || btnSelected === 3 || btnSelected === 4"
-      :formItems="formItems"
-      :propFormData="propFormData"
-      @getQueryParams="handleQuery"
-    >
-    </query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="600"
-    >
-      <template #right>
-        <template v-if="btnSelected === 1">
-          <el-button
-            v-if="hasPerm('car:add')"
-            size="mini"
-            @click="add"
-            type="primary"
-          >
-            新增车辆
-          </el-button>
-          <el-button
-            v-if="hasPerm('car:white')"
-            size="mini"
-            @click="btnSelected = 5"
-            type="success"
-          >
-            查看白名单
-          </el-button>
-          <el-button
-            v-if="hasPerm('car:black')"
-            size="mini"
-            @click="btnSelected = 6"
-            type="warning"
-          >
-            查看黑名单
-          </el-button>
-        </template>
-        <template v-if="btnSelected === 5">
-          <el-button size="mini" type="success" @click="addWhite(1)">
-            添加白名单
-          </el-button>
-          <el-button size="mini" @click="btnSelected = 1" type="primary">
-            查看车辆档案
-          </el-button>
-          <el-button size="mini" @click="btnSelected = 6" type="warning">
-            查看黑名单
-          </el-button>
-        </template>
-        <template v-if="btnSelected === 6">
-          <el-button size="mini" type="success" @click="addWhite(2)">
-            添加黑名单
-          </el-button>
-          <el-button size="mini" @click="btnSelected = 1" type="primary">
-            查看车辆档案
-          </el-button>
-          <el-button size="mini" @click="btnSelected = 5" type="success">
-            查看白名单
-          </el-button>
-        </template>
-      </template>
-      <!-- <template v-slot:right>
-        <template>
-        <div>共{{ total }}辆车</div>
-        </template>
-        <template v-else-if="btnSelected === 2">
-          <div>
-            <el-button size="mini">黑名单</el-button>
-          </div>
-        </template>
-        <template v-else>
-          <div>
-            <el-button size="mini">黑名单</el-button>
-          </div>
-        </template>
-      </template> -->
-      <!--  白名单操作    -->
-      <template #whiteHandle="scope">
-        <el-button
-          v-if="hasPerm('car:white-del')"
-          size="mini"
-          type="primary"
-          @click="del(scope.row, 1)"
-        >
-          移出白名单
-        </el-button>
-      </template>
-      <template #blackHandle="scope">
-        <el-button
-          v-if="hasPerm('car:black-del')"
-          size="mini"
-          type="primary"
-          @click="del(scope.row, 2)"
-        >
-          移出黑名单
-        </el-button>
-      </template>
-      <!--  车辆档案操作    -->
-      <template #handle="scope">
-        <!--        <el-button size="mini" type="success" @click="onJoin(scope.row, 1)">加入白名单</el-button>-->
-        <!--        <el-button size="mini" type="warning" @click="onJoin(scope.row, 2)">加入黑名单</el-button>-->
-        <el-button
-          v-if="hasPerm('car:del')"
-          size="mini"
-          type="danger"
-          @click="onJoin(scope.row, 3)"
-        >
-          删除
-        </el-button>
-      </template>
-      <template v-slot:carNum="slotProps">
-        {{ slotProps.row.carNum ? slotProps.row.carNum : "未识别" }}
-      </template>
-      <template #carHandle="scope">
-        <el-button
-          v-if="scope.row.carNum"
-          size="mini"
-          @click="addBase(scope.row.carNum)"
-          >添加到车辆档案</el-button
-        >
-      </template>
-      <template v-slot:originalPicPath="slotProps">
-        <img
-          :src="slotProps.row.originalPicPath"
-          @click="clickImg(slotProps.row.originalPicPath)"
-          alt="车辆通行"
-          width="120"
-        />
-      </template>
-      <template v-slot:alarmPicture="slotProps">
-        <img
-          :src="slotProps.row.alarmPicture"
-          @click="clickImg(slotProps.row.alarmPicture)"
-          alt="车辆通行"
-          width="120"
-        />
-      </template>
-      <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)">
-          查看回放
-        </el-button>
-      </template>
-
-      <!-- 车辆烘干 -->
-      <template #chekOk="scope">
-        <span>{{ scope.row.chekOk === "1" ? "是" : "否" }}</span>
-      </template>
-      <template #handlerDrying="slotProps">
-        <el-button size="mini" @click="clickDryingEvent(slotProps.row)">
-          查看本次烘干温度详情
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog :title="'车辆档案新增'" :visible.sync="isFile" width="50%">
-      <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px">
-        <el-form-item prop="carId" label="车辆编号" v-if="showType">
-          <el-input v-model="form.carId" disabled></el-input>
-        </el-form-item>
-        <el-form-item prop="carNum" label="车牌号">
-          <el-input v-model="form.carNum"></el-input>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="reset">取 消</el-button>
-        <el-button type="primary" @click="submitForm('ruleForm')">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="车辆图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="车辆通行" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-
-    <el-dialog title="温度详情" :visible.sync="tempVisible" width="80%">
-      <div style="width: 100%; height: 500px">
-        <chart-car-drying :tempList="tempChartData"></chart-car-drying>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="tempVisible = false">取 消</el-button>
-        <el-button type="primary" @click="tempVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-    <el-dialog
-      :title="showType ? '添加黑名单' : '添加白名单'"
-      :visible.sync="isWhite"
-      width="50%"
-    >
-      <new-table
-        :title="''"
-        :listData="abList"
-        :tableItems="abItems"
-        :shows="abShows"
-        @selectionChange="selectionChange"
-      ></new-table>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="isWhite = false">取 消</el-button>
-        <el-button type="primary" @click="clickCar">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import HeadBtns from "components/bioSafety/Btns";
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-import ChartCarDrying from "./chart/ChartCarDrying.vue";
-
-import { formItems, propFormData } from "./carAdmin/queryCondition.config";
-import { titles, tableItems, tableShows } from "./carAdmin/table.config";
-
-import {
-  getCarPassage,
-  getCarWash,
-  getCarWashTotal,
-  getCarWashVideo,
-  getCarDrying,
-  getCarDryingTemp,
-  getCarList,
-  addCarWhite,
-  addCarBlack,
-  showCarWhite,
-  addCarBase,
-  showCarBlack,
-  delCarWhite,
-  delCarBlack,
-  delCarBase,
-  addWandB,
-} from "../../utils/chenApi";
-import { timeDate } from "../../utils/index";
-import { mapState } from "vuex";
-
-export default {
-  name: "CarAdmin",
-  components: {
-    HeadBtns,
-    QueryConditions,
-    NewTable,
-    TableFooter,
-    ChartCarDrying,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      btnNames: [
-        // 按钮情况
-        { id: 1, name: "车辆档案" },
-        { id: 2, name: "车辆通行" },
-        { id: 3, name: "车辆洗消" },
-        { id: 4, name: "车辆烘干" },
-      ],
-      btnSelected: 1, // 选中的按钮
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      dialogVisible: false,
-      imgUrl: "", // 点击图片后放大的图片路径
-      videoVisible: false, // 车辆回放
-      rtsp: "", // 车辆回放的地址
-      tempVisible: false, // 车辆烘干 - 查看温度详情
-      tempChartData: {},
-      isFile: false,
-      form: {
-        carId: "",
-        carNum: "",
-      },
-      rules: {
-        carId: [{ required: true, message: "请输入车辆编号", trigger: "blur" }],
-        carNum: [{ required: true, message: "请输入车牌号", trigger: "blur" }],
-      },
-      showType: false,
-      isWhite: false,
-      // 白黑名单
-      abList: [],
-      abItems: [
-        {
-          prop: "carId",
-          label: "车辆编号",
-          minWidth: "120",
-          slotName: "carId",
-        },
-        {
-          prop: "carNum",
-          label: "车牌号",
-          minWidth: "120",
-          slotName: "carNum",
-        },
-      ],
-      abShows: {
-        showIndex: false,
-        showSelect: true,
-      },
-      selectList: [],
-    };
-  },
-  watch: {
-    btnSelected: {
-      handler(newVal) {
-        const loading = this.$loading({
-          lock: true,
-          text: "加载中...",
-          spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
-        });
-        this.pageNum = 1;
-        this.listData = [];
-        if (newVal > 1) {
-          this.formItems = formItems[this.btnSelected - 2];
-          this.propFormData = propFormData[this.btnSelected - 2];
-        } else {
-          this.formItems = {};
-          this.propFormData = {};
-        }
-        this.title = titles[this.btnSelected - 1];
-        this.tableItems = tableItems[this.btnSelected - 1];
-        this.getPageFn(newVal).forEach(async (fn) => {
-          await fn();
-        });
-        // if (newVal === 1) {
-        //   // 档案
-        //   await this.getCarList();
-        // } else if (newVal === 2) {
-        //   // 车辆通行
-        //   await this.carPassage();
-        // } else if (newVal === 3) {
-        //   // 车辆洗消
-        //   await this.carWash();
-        // } else if (newVal === 4) {
-        //   // 车辆烘干
-        //   await this.carDrying();
-        // } else if (newVal === 5) {
-        //   // 白名单
-        //   await this.ShowCarWhite();
-        // } else {
-        //   // 黑名单
-        //   await this.ShowCarBlack();
-        // }
-        loading.close();
-      },
-    },
-  },
-  mounted() {
-    this.formItems = formItems[this.btnSelected - 1];
-    this.propFormData = propFormData[this.btnSelected - 1];
-    this.title = titles[this.btnSelected - 1];
-    this.tableItems = tableItems[this.btnSelected - 1];
-    this.tableShows = tableShows;
-    // 档案
-    this.getCarList();
-  },
-  methods: {
-    getBtnSelected(id) {
-      this.btnSelected = id;
-    },
-    // 获取当前操作对应的页面请求
-    getPageFn(newVal) {
-      const fns = {
-        1: [this.getCarList], // 档案
-        2: [this.carPassage], // 车辆通行
-        3: [this.carWash, this.carWashTotal], // 车辆洗消
-        4: [this.carDrying], // 车辆烘干
-        5: [this.ShowCarWhite], // 白名单
-        6: [this.ShowCarBlack], // 黑名单
-      };
-      return fns[newVal];
-    },
-    // 获取查询条件
-    handleQuery(params) {
-      this.pageNum = 1;
-      this.params = params;
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-
-      this.listData = [];
-      this.getPageFn(this.btnSelected).forEach(async (fn) => {
-        await fn();
-      });
-      loading.close();
-    },
-    // 修改size
-    async sizeChange(val) {
-      this.size = val;
-      this.pageNum = 1;
-      this.listData = [];
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      await this.getPageFn(this.btnSelected)[0]();
-      loading.close();
-    },
-    // 修改页数
-    async pageChange(val) {
-      this.pageNum = val;
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      await this.getPageFn(this.btnSelected)[0]();
-      loading.close();
-    },
-    // 车辆通行 查询
-    carPassage() {
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        carNum: this.params.name || undefined,
-      };
-      getCarPassage(queryParams).then((res) => {
-        const result = JSON.parse(res.result);
-        this.listData = result.data.pageData;
-        this.listData.forEach((item) => {
-          item.originalPicPath = `${this.ip}/video/picture/get?fileUrl=${item.originalPicPath}`;
-          item.devChnName = item.devChnName.split("_")[0];
-        });
-        this.total = parseInt(result.data.totalRows);
-      });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 车辆档案
-    getCarList() {
-      let params = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-      };
-      getCarList(params).then((res) => {
-        if (res.code == 200) {
-          const result = JSON.parse(res.result);
-          this.total = parseInt(result.data.totalRows);
-          this.listData = result.data.pageData;
-        }
-      });
-    },
-    // 档案操作
-    onJoin(row, num) {
-      if (num === 1) {
-        addCarWhite({ carId: row.carId }).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("加入白名单成功");
-            this.getCarList();
-          } else {
-            this.$message.error(res.errMsg);
-          }
-        });
-      } else if (num === 2) {
-        addCarBlack({ carId: row.carId }).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("加入黑名单成功");
-            this.getCarList();
-          } else {
-            this.$message.error(res.errMsg);
-          }
-        });
-      } else if (num === 3) {
-        // 删除
-        let params = {
-          carIdList: [row.carId],
-        };
-        delCarBase(params).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("删除成功");
-            this.getCarList();
-          } else {
-            this.$message.error(res.errMsg);
-          }
-        });
-      }
-    },
-    // 新增车辆
-    add() {
-      this.isFile = true;
-      this.showType = false;
-    },
-
-    // 添加白名单
-    addWhite(num) {
-      this.isWhite = true;
-      let params = {
-        pageNum: 1,
-        pageSize: 200,
-      };
-      if (num === 1) {
-        params.draw = 4;
-        this.showType = false;
-      } else {
-        this.showType = true;
-        params.draw = 5;
-      }
-      addWandB(params).then((res) => {
-        if (res.code == 200) {
-          const result = JSON.parse(res.result);
-          this.abList = result.data.pageData;
-        } else {
-          this.$message.error(res.errMsg);
-        }
-      });
-    },
-    clickCar() {
-      if (this.selectList.length > 0) {
-        let params = {};
-        let arr = [];
-        this.selectList.forEach((item) => {
-          arr.push(item.carId);
-        });
-        params.carIdList = arr;
-        if (this.showType) {
-          // 黑名单
-          addCarBlack(params).then((res) => {
-            if (res.code == 200) {
-              this.$message.success("添加成功!");
-              this.ShowCarBlack();
-            } else {
-              this.$message.error(res.errMsg);
-            }
-            this.isWhite = false;
-          });
-        } else {
-          addCarWhite(params).then((res) => {
-            if (res.code == 200) {
-              this.$message.success("添加成功!");
-              this.ShowCarWhite();
-            } else {
-              this.$message.error(res.errMsg);
-            }
-            this.isWhite = false;
-          });
-        }
-      } else {
-        this.$message.error("请选择要添加的车辆!");
-      }
-    },
-    // 选择
-    selectionChange(item) {
-      this.selectList = item;
-    },
-    // 档案编辑
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.showType) {
-            // 编辑
-          } else {
-            let params = {
-              carNum: this.form.carNum,
-            };
-            addCarBase(params).then((res) => {
-              if (res.code == 200) {
-                this.reset();
-                this.$message.success("添加成功");
-                this.getCarList();
-              } else {
-                this.$message.error(res.errMsg);
-              }
-            });
-          }
-        } else {
-          return false;
-        }
-      });
-    },
-    // 重置
-    reset() {
-      this.isFile = false;
-      this.showType = false;
-      this.form = {
-        carNum: "",
-        carId: "",
-      };
-    },
-    // 白名单列表
-    ShowCarWhite() {
-      let params = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-      };
-      showCarWhite(params).then((res) => {
-        if (res.code == 200) {
-          const result = JSON.parse(res.result);
-          this.total = parseInt(result.data.totalRows);
-          this.listData = result.data.pageData;
-        }
-      });
-    },
-    // 黑名单列表
-    ShowCarBlack() {
-      let params = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-      };
-      showCarBlack(params).then((res) => {
-        if (res.code == 200) {
-          const result = JSON.parse(res.result);
-          this.total = parseInt(result.data.totalRows);
-          this.listData = result.data.pageData;
-        } else {
-          this.$message.error(res.errMsg);
-        }
-      });
-    },
-    // 移除黑白名单
-    del(row, num) {
-      let params = {
-        carIdList: [row.carId],
-      };
-      if (num === 1) {
-        delCarWhite(params).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("移出白名单成功!");
-            this.ShowCarWhite();
-          } else {
-            this.$message.error(res.errMsg);
-          }
-        });
-      } else {
-        delCarBlack(params).then((res) => {
-          if (res.code == 200) {
-            this.$message.success("移出黑名单成功!");
-            this.ShowCarBlack();
-          } else {
-            this.$message.error(res.errMsg);
-          }
-        });
-      }
-    },
-    // 车辆通行添加到车辆档案
-    addBase(id) {
-      let params = {
-        carNum: id,
-      };
-      addCarBase(params).then((res) => {
-        if (res.code == 200) {
-          this.$message.success("添加成功!");
-        } else {
-          this.$message.error(res.errMsg);
-        }
-      });
-    },
-    // 车辆洗消
-    carWash() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-        nodeCodeList: ["1002871$1$0$0", "1002872$1$0$0", "1002873$1$0$0"],
-        deviceCategory: 1,
-        alarmType: 303,
-        dbType: 0,
-      };
-      getCarWash(queryParams).then(async (res) => {
-        const result = JSON.parse(res.result);
-        this.listData = result.data.pageData;
-        this.listData.forEach((item) => {
-          item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-        });
-      });
-    },
-    // 车辆洗消 - 按钮
-    clickEvent(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        }
-      });
-    },
-    // 车辆洗消 - 总条数
-    carWashTotal() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        orgCodeList: [],
-        nodeCodeList: ["1002871$1$0$0", "1002872$1$0$0", "1002873$1$0$0"],
-        deviceCategory: 1,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-        alarmType: 303,
-        dbType: 0,
-      };
-      getCarWashTotal(queryParams).then((res) => {
-        this.total = JSON.parse(res.result).data.value;
-      });
-    },
-    // 车辆烘干
-    carDrying() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime() - 1000 * 60 * 60 * 24 * 3),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      getCarDrying({
-        startTimeString: this.params.time[0] + " 00:00:00",
-        endTimeString: this.params.time[1] + " 23:59:59",
-        current: this.pageNum,
-        size: this.size,
-      }).then((res) => {
-        if (res && res.code === 10000) {
-          this.listData = res.data.records;
-          this.total = res.data.total;
-        }
-      });
-    },
-    // 车辆烘干的回放事件
-    clickDryingEvent(row) {
-      getCarDryingTemp({
-        deviceId: row.deviceId,
-        eventTimeString: row.eventTime,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.tempChartData = res.data;
-          this.tempVisible = true;
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.car-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 382
src/views/BioSafety/DeadPig.vue

@@ -1,382 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-12-22 09:35:10
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\BioSafety\DeadPig.vue
--->
-<template>
-  <div class="dead-pig">
-    <!-- 筛选条件 -->
-    <query-conditions
-      :defaultEmit="true"
-      :formItems="formItems"
-      :propFormData="propFormData"
-      @getQueryParams="handleQuery"
-    ></query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="535"
-    >
-      <template v-slot:alarmPicture="slotProps">
-        <img
-          :src="slotProps.row.alarmPicture"
-          @click="clickImg(slotProps.row.alarmPicture)"
-          alt="死猪图片"
-          width="100%"
-        />
-      </template>
-
-      <!-- 回放按钮 -->
-      <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)">
-          查看回放
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="死猪图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-
-import { formItems, propFormData } from "./deadPig/queryCondition.config";
-import { title, tableItems, tableShows } from "./deadPig/table.config";
-import { mapState } from "vuex";
-import { timeDate } from "../../utils/index";
-
-import {
-  getCarWash,
-  getCarWashTotal,
-  getCarWashVideo,
-} from "../../utils/chenApi";
-
-export default {
-  name: "DeadPig",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      dialogVisible: false,
-      imgUrl: "",
-      rtsp: "",
-      videoVisible: false,
-    };
-  },
-  mounted() {
-    this.formItems = formItems;
-    this.propFormData = propFormData;
-    this.propFormData.time = [
-      timeDate(new Date().getTime()),
-      timeDate(new Date().getTime()),
-    ];
-    this.title = title;
-    this.tableItems = tableItems;
-    this.tableShows = tableShows;
-    this.pigManage();
-    this.pigTotal();
-  },
-  methods: {
-    // 获取查询条件
-    handleQuery(params) {
-      this.params = params;
-      this.pageNum = 1;
-      this.pigManage();
-      this.pigTotal();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      // this.init();
-      this.pageNum = 1;
-      this.pigManage();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      // this.init();
-      this.pigManage();
-    },
-    // 死猪管理
-    pigManage() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-        nodeCodeList: [
-          "1002874$1$0$0",
-          "1002875$1$0$0",
-          "1002876$1$0$0",
-          "1002877$1$0$0",
-          "1002878$1$0$0",
-          "1002879$1$0$0",
-          "1002880$1$0$0",
-          "1002881$1$0$0",
-          "1002882$1$0$0",
-          "1002883$1$0$0",
-          "1002884$1$0$0",
-          "1002885$1$0$0",
-          "1002886$1$0$0",
-          "1002887$1$0$0",
-          "1002888$1$0$0",
-          "1002889$1$0$0",
-          "1002890$1$0$0",
-          "1002891$1$0$0",
-          "1002892$1$0$0",
-          "1002893$1$0$0",
-          "1002894$1$0$0",
-          "1002895$1$0$0",
-          "1002896$1$0$0",
-          "1002897$1$0$0",
-          "1002898$1$0$0",
-          "1002899$1$0$0",
-          "1002900$1$0$0",
-          "1002901$1$0$0",
-          "1002902$1$0$0",
-          "1002903$1$0$0",
-          "1002904$1$0$0",
-          "1002905$1$0$0",
-          "1002906$1$0$0",
-          "1002907$1$0$0",
-          "1002908$1$0$0",
-          "1002909$1$0$0",
-          "1002910$1$0$0",
-          "1002911$1$0$0",
-          "1002912$1$0$0",
-          "1002913$1$0$0",
-          "1002939$1$0$0",
-          "1002939$1$0$1",
-          "1002939$1$0$2",
-          "1002939$1$0$3",
-          "1002939$1$0$4",
-          "1002939$1$0$5",
-          "1002939$1$0$6",
-          "1002939$1$0$7",
-          "1002939$1$0$8",
-          "1002939$1$0$9",
-          "1002940$1$0$0",
-          "1002940$1$0$1",
-          "1002940$1$0$2",
-          "1002940$1$0$3",
-          "1002940$1$0$4",
-          "1002940$1$0$5",
-          "1002940$1$0$6",
-          "1002940$1$0$7",
-          "1002939$1$0$10",
-          "1002939$1$0$11",
-          "1002939$1$0$12",
-          "1002939$1$0$13",
-          "1002939$1$0$14",
-          "1002939$1$0$15",
-        ],
-        deviceCategory: 1,
-        alarmType: 303,
-        dbType: 0,
-      };
-      getCarWash(queryParams).then(async (res) => {
-        if (res) {
-          loading.close();
-          const result = JSON.parse(res.result);
-          this.listData = result.data.pageData;
-          this.listData.forEach((item) => {
-            item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-          });
-        }
-        loading.close();
-      });
-    },
-    // 死猪管理 - 总数
-    async pigTotal() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        orgCodeList: [],
-        nodeCodeList: [
-          "1002874$1$0$0",
-          "1002875$1$0$0",
-          "1002876$1$0$0",
-          "1002877$1$0$0",
-          "1002878$1$0$0",
-          "1002879$1$0$0",
-          "1002880$1$0$0",
-          "1002881$1$0$0",
-          "1002882$1$0$0",
-          "1002883$1$0$0",
-          "1002884$1$0$0",
-          "1002885$1$0$0",
-          "1002886$1$0$0",
-          "1002887$1$0$0",
-          "1002888$1$0$0",
-          "1002889$1$0$0",
-          "1002890$1$0$0",
-          "1002891$1$0$0",
-          "1002892$1$0$0",
-          "1002893$1$0$0",
-          "1002894$1$0$0",
-          "1002895$1$0$0",
-          "1002896$1$0$0",
-          "1002897$1$0$0",
-          "1002898$1$0$0",
-          "1002899$1$0$0",
-          "1002900$1$0$0",
-          "1002901$1$0$0",
-          "1002902$1$0$0",
-          "1002903$1$0$0",
-          "1002904$1$0$0",
-          "1002905$1$0$0",
-          "1002906$1$0$0",
-          "1002907$1$0$0",
-          "1002908$1$0$0",
-          "1002909$1$0$0",
-          "1002910$1$0$0",
-          "1002911$1$0$0",
-          "1002912$1$0$0",
-          "1002913$1$0$0",
-          "1002939$1$0$0",
-          "1002939$1$0$1",
-          "1002939$1$0$2",
-          "1002939$1$0$3",
-          "1002939$1$0$4",
-          "1002939$1$0$5",
-          "1002939$1$0$6",
-          "1002939$1$0$7",
-          "1002939$1$0$8",
-          "1002939$1$0$9",
-          "1002940$1$0$0",
-          "1002940$1$0$1",
-          "1002940$1$0$2",
-          "1002940$1$0$3",
-          "1002940$1$0$4",
-          "1002940$1$0$5",
-          "1002940$1$0$6",
-          "1002940$1$0$7",
-          "1002939$1$0$10",
-          "1002939$1$0$11",
-          "1002939$1$0$12",
-          "1002939$1$0$13",
-          "1002939$1$0$14",
-          "1002939$1$0$15",
-        ],
-        deviceCategory: 1,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-        alarmType: 303,
-        dbType: 0,
-      };
-      const res = await getCarWashTotal(queryParams);
-      if (res) {
-        this.total = JSON.parse(res.result).data.value;
-      }
-      // getCarWashTotal(queryParams).then((res) => {
-      //   console.log(res.result);
-      //   this.total = JSON.parse(res.result).data.value;
-      // });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 死猪回放
-    // 车辆洗消 - 按钮
-    clickEvent(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        } else {
-          this.$message.error("视频获取失败");
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.dead-pig {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 305
src/views/BioSafety/DoorAdmin.vue

@@ -1,305 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-17 15:50:33
- * @LastEditTime: 2021-12-22 09:33:53
- * @LastEditors: Please set LastEditors
- * @Description: 大门事件
- * @FilePath: \hyyfClient\src\views\BioSafety\DoorAdmin.vue
--->
-<template>
-  <div class="door-admin">
-    <!-- 筛选条件 -->
-    <query-conditions
-      :defaultEmit="true"
-      :formItems="formItems"
-      :propFormData="propFormData"
-      @getQueryParams="handleQuery"
-    ></query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="535"
-    >
-      <template v-slot:alarmPicture="slotProps">
-        <img
-          :src="slotProps.row.alarmPicture"
-          @click="clickImg(slotProps.row.alarmPicture)"
-          alt="死猪图片"
-          width="100%"
-        />
-      </template>
-
-      <!-- 回放按钮 -->
-      <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)">
-          查看回放
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="死猪图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-
-import { formItems, propFormData } from "./doorAdmin/queryCondition.config";
-import { title, tableItems, tableShows } from "./doorAdmin/table.config";
-import { mapState } from "vuex";
-import { timeDate } from "../../utils/index";
-
-import {
-  getDoorAdmin,
-  // getCarWashTotal,
-  getCarWashVideo,
-} from "../../utils/chenApi";
-
-export default {
-  name: "DeadPig",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      dialogVisible: false,
-      imgUrl: "",
-      rtsp: "",
-      videoVisible: false,
-    };
-  },
-  mounted() {
-    this.formItems = formItems;
-    this.propFormData = propFormData;
-    this.title = title;
-    this.tableItems = tableItems;
-    this.tableShows = tableShows;
-    this.pigManage();
-    this.pigTotal();
-  },
-  methods: {
-    // 获取查询条件
-    handleQuery(params) {
-      this.params = params;
-      this.pageNum = 1;
-      this.pigManage();
-      this.pigTotal();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      // this.init();
-      this.pageNum = 1;
-      this.pigManage();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      // this.init();
-      this.pigManage();
-    },
-    // 死猪管理
-    pigManage() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime() - 1000 * 60 * 60 * 24),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-      };
-      getDoorAdmin(queryParams).then(async (res) => {
-        loading.close();
-        if (res && res.code === 0) {
-          const result = JSON.parse(res.data.result);
-          this.listData = result.data.pageData;
-          this.listData.forEach((item) => {
-            item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-          });
-          this.total = parseInt(res.total);
-        } else {
-          res && this.$message.warning(res.message);
-        }
-      });
-    },
-    // 死猪管理 - 总数
-    pigTotal() {
-      // if (!this.params.time) {
-      //   this.params.time = [
-      //     timeDate(new Date().getTime() - 1000 * 60 * 60 * 24),
-      //     timeDate(new Date().getTime()),
-      //   ];
-      // }
-      // let queryParams = {
-      //   orgCodeList: [],
-      //   nodeCodeList: [
-      //     "1002874$1$0$0",
-      //     "1002875$1$0$0",
-      //     "1002876$1$0$0",
-      //     "1002877$1$0$0",
-      //     "1002878$1$0$0",
-      //     "1002879$1$0$0",
-      //     "1002880$1$0$0",
-      //     "1002881$1$0$0",
-      //     "1002882$1$0$0",
-      //     "1002883$1$0$0",
-      //     "1002884$1$0$0",
-      //     "1002885$1$0$0",
-      //     "1002886$1$0$0",
-      //     "1002887$1$0$0",
-      //     "1002888$1$0$0",
-      //     "1002889$1$0$0",
-      //     "1002890$1$0$0",
-      //     "1002891$1$0$0",
-      //     "1002892$1$0$0",
-      //     "1002893$1$0$0",
-      //     "1002894$1$0$0",
-      //     "1002895$1$0$0",
-      //     "1002896$1$0$0",
-      //     "1002897$1$0$0",
-      //     "1002898$1$0$0",
-      //     "1002899$1$0$0",
-      //     "1002900$1$0$0",
-      //     "1002901$1$0$0",
-      //     "1002902$1$0$0",
-      //     "1002903$1$0$0",
-      //     "1002904$1$0$0",
-      //     "1002905$1$0$0",
-      //     "1002906$1$0$0",
-      //     "1002907$1$0$0",
-      //     "1002908$1$0$0",
-      //     "1002909$1$0$0",
-      //     "1002910$1$0$0",
-      //     "1002911$1$0$0",
-      //     "1002912$1$0$0",
-      //     "1002913$1$0$0",
-      //     "1002939$1$0$0",
-      //     "1002939$1$0$1",
-      //     "1002939$1$0$2",
-      //     "1002939$1$0$3",
-      //     "1002939$1$0$4",
-      //     "1002939$1$0$5",
-      //     "1002939$1$0$6",
-      //     "1002939$1$0$7",
-      //     "1002939$1$0$8",
-      //     "1002939$1$0$9",
-      //     "1002940$1$0$0",
-      //     "1002940$1$0$1",
-      //     "1002940$1$0$2",
-      //     "1002940$1$0$3",
-      //     "1002940$1$0$4",
-      //     "1002940$1$0$5",
-      //     "1002940$1$0$6",
-      //     "1002940$1$0$7",
-      //     "1002939$1$0$10",
-      //     "1002939$1$0$11",
-      //     "1002939$1$0$12",
-      //     "1002939$1$0$13",
-      //     "1002939$1$0$14",
-      //     "1002939$1$0$15",
-      //   ],
-      //   deviceCategory: 1,
-      //   alarmStartDateString: this.params.time[0] + " 00:00:00",
-      //   alarmEndDateString: this.params.time[1] + " 23:59:59",
-      //   alarmType: 303,
-      //   dbType: 0,
-      // };
-      // getCarWashTotal(queryParams).then((res) => {
-      //   this.total = JSON.parse(res.result).data.value;
-      // });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 大门回放
-    clickEvent(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        } else {
-          this.$message.error("视频获取失败");
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.door-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 426
src/views/BioSafety/PersonAdmin.vue

@@ -1,426 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-12-30 17:38:30
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\BioSafety\PersonAdmin.vue
--->
-<template>
-  <div class="person-admin">
-    <!-- 顶部的按钮选择 -->
-    <head-btns
-      :btnNames="btnNames"
-      :btnSelected="btnSelected"
-      @btnSelected="getBtnSelected"
-    >
-    </head-btns>
-
-    <!-- 图 -->
-    <board v-if="btnSelected === 2">
-      <div
-        class="charts"
-        v-loading="loading"
-        element-loading-text="拼命加载中"
-        element-loading-spinner="el-icon-loading"
-        element-loading-background="rgba(0, 0, 0, 0.8)"
-      >
-        <chart-electro :total="total1"></chart-electro>
-        <cost-histogram v-bind="recordData"></cost-histogram>
-      </div>
-    </board>
-
-    <!-- 筛选条件 -->
-    <query-conditions
-      :formItems="formItems"
-      :propFormData="propFormData"
-      :defaultEmit="true"
-      @getQueryParams="handleQuery"
-    >
-    </query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="475"
-      @selectionChange="handleSelectionChange"
-    >
-      <template v-slot:right>
-        <template v-if="btnSelected === 1">
-          <div>
-            <el-button
-              size="mini"
-              @click="handleAddOrEdit"
-              v-if="hasPerm('personAdmin:add')"
-            >
-              新增人员
-            </el-button>
-            <el-button size="mini" type="danger" @click="handleDelete">
-              批量删除
-            </el-button>
-          </div>
-        </template>
-        <!-- <template v-else-if="btnSelected === 2">
-          <div>共{{ total }}人,其中男 人,女 人</div>
-        </template>
-        <template v-else>
-          <div>
-            <el-button size="mini">添加赶猪人员</el-button>
-          </div>
-        </template> -->
-      </template>
-
-      <!-- 人员门禁 -->
-      <template v-slot:recordImage="slotProps">
-        <img
-          :src="slotProps.row.recordImage"
-          alt="人员门禁"
-          width="50px"
-          @click="clickImg(slotProps.row.recordImage)"
-        />
-      </template>
-      <template v-slot:personName="slotProps">
-        {{ slotProps.row.personName ? slotProps.row.personName : "未知 " }}
-      </template>
-
-      <!-- 档案管理 -->
-      <template v-slot:personBiosignatures="slotProps">
-        <img
-          :src="
-            slotProps.row.personBiosignatures
-              ? slotProps.row.personBiosignatures[0].path
-              : ''
-          "
-          alt="没有图片"
-          width="100"
-          @click="clickImg(slotProps.row.personBiosignatures[0].path)"
-        />
-      </template>
-      <template #sex="slotProps">
-        <span>{{ personSex[slotProps.row.sex] }}</span>
-      </template>
-      <template #status="slotProps">
-        <span>{{ personStatus[slotProps.row.status] }}</span>
-      </template>
-      <template #handler="slotProps">
-        <!--        <el-button-->
-        <!--          size="mini"-->
-        <!--          type="primary"-->
-        <!--          @click="handleAddOrEdit(slotProps.row)"-->
-        <!--        >-->
-        <!--          编 辑-->
-        <!--        </el-button>-->
-        <el-button
-          size="mini"
-          type="danger"
-          @click="handleDelete(slotProps.row)"
-          v-if="hasPerm('personAdmin:del')"
-        >
-          删 除
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="人脸图片" :visible.sync="dialogVisible" width="40%">
-      <img :src="imgUrl" alt="人脸图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-    <add-or-edit ref="addOrEdit" @reflash="reflash"></add-or-edit>
-  </div>
-</template>
-
-<script>
-import HeadBtns from "components/bioSafety/Btns";
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-import Board from "components/bioSafety/Board";
-import ChartElectro from "./chart/ChartElectro.vue";
-import CostHistogram from "./chart/CostHistogram.vue";
-import { timeDate } from "../../utils/index";
-import AddOrEdit from "./personAdmin/AddOrEdit.vue";
-
-import { formItems, propFormData } from "./personAdmin/queryCondition.config";
-import { titles, tableItems, tableShows } from "./personAdmin/table.config";
-import { getFaceGuard } from "../../utils/api";
-import {
-  getFaceGuardTotal,
-  getPersonFiles,
-  getRecord,
-  delPerson,
-} from "../../utils/chenApi";
-import { mapState } from "vuex";
-
-export default {
-  name: "PersonAdmin",
-  components: {
-    HeadBtns,
-    QueryConditions,
-    NewTable,
-    TableFooter,
-    Board,
-    ChartElectro,
-    CostHistogram,
-    AddOrEdit,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      btnNames: [
-        // 按钮情况
-        { id: 1, name: "档案管理" },
-        { id: 2, name: "人脸门禁" },
-        // { id: 3, name: '赶猪监管' }
-      ],
-      btnSelected: 1, // 选中的按钮
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      total1: 0,
-      isTotal: false,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      personStatus: ["已删除", "正常", "冻结"], // 档案管理 - 人员状态
-      personSex: ["未知", "男", "女"], // 档案管理 - 性别
-      dialogVisible: false, // 图片放大,也不知道得多老眼昏花,这么大的图片还要再大
-      imgUrl: "", // 点击图片后放大的图片路径
-      recordData: {}, // 进出统计
-      loading: true,
-      rows: [], // 人员列表 selection
-    };
-  },
-  mounted() {
-    this.formItems = formItems[this.btnSelected - 1];
-    this.propFormData = propFormData[this.btnSelected - 1];
-    this.title = titles[this.btnSelected - 1];
-    this.tableItems = tableItems[this.btnSelected - 1];
-    this.tableShows = tableShows;
-    this.tableShows.showSelect = true;
-    this.initPersonFiles();
-  },
-  methods: {
-    // 获取选中的按钮情况
-    getBtnSelected(id) {
-      this.btnSelected = id;
-      this.formItems = formItems[id - 1];
-      this.propFormData = propFormData[id - 1];
-      this.title = titles[id - 1];
-      this.tableItems = tableItems[id - 1];
-      if (this.btnSelected === 1) {
-        this.tableShows.showSelect = true;
-      }
-      this.chooseApi();
-    },
-    // 按钮选中情况 --> 对应的 api
-    chooseApi(flag = true) {
-      if (this.btnSelected === 1) {
-        if (flag) {
-          this.pageNum = 1;
-        }
-        this.initPersonFiles();
-      } else {
-        if (flag) {
-          this.pageNum = 1;
-          this.faceGuardTotal();
-        }
-        this.faceGuard();
-      }
-    },
-    // 获取查询条件
-    handleQuery(params) {
-      this.params = params;
-      this.chooseApi();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      this.chooseApi(false);
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.chooseApi(false);
-    },
-    // 人脸门禁的查询 + 近 7 小时进出统计
-    faceGuard() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        personName: this.params.name || undefined,
-        startSwingTime: this.params.time[0] + " 00:00:00",
-        endSwingTime: this.params.time[1] + " 23:59:59",
-        openType: 61, // 进门,刷脸
-      };
-      getFaceGuard(queryParams).then(async (res) => {
-        if (!res.result) {
-          return;
-        }
-        // 结果是 JSON 格式
-        this.listData = JSON.parse(res.result).data.pageData;
-        this.listData.forEach((item) => {
-          item.channelName = item.channelName.split("人脸门禁")[0];
-          // item.recordImage = `https://36.26.62.70:447/evo-pic/${item.recordImage}?token=${token}&oss_addr=172.16.3.223:8925`;
-          item.recordImage = `${this.ip}/video/picture/get?alarmPicture=${item.recordImage}`;
-        });
-        // 近 7 小时进出统计
-        const recordRes = await getRecord({});
-        if (!res.result) {
-          return;
-        }
-        if (recordRes.code === 0) {
-          const timeList = [];
-          const dataList = [];
-          recordRes.data.forEach((item) => {
-            timeList.push(item.time);
-            dataList.push(item.value);
-          });
-          this.recordData = { timeList, dataList };
-        } else {
-          this.recordData = { timeList: [], dataList: [] };
-        }
-        this.loading = false;
-      });
-    },
-    // 人脸门禁总条数
-    faceGuardTotal() {
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        personName: this.params.name || undefined,
-        startSwingTime: this.params.time[0] + " 00:00:00",
-        endSwingTime: this.params.time[1] + " 23:59:59",
-        openType: 61, // 进门,刷脸
-      };
-      getFaceGuardTotal(queryParams).then((res) => {
-        if (!res.result) {
-          return;
-        }
-        this.total = JSON.parse(res.result).data;
-        if (this.isTotal === false) {
-          this.total1 = JSON.parse(res.result).data;
-          this.isTotal = true;
-        }
-      });
-    },
-    // 档案管理
-    initPersonFiles() {
-      getPersonFiles({
-        searchKey: "",
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        departmentId: this.params.departmentId || 5,
-        isContain: true,
-        statusList: [1, 2],
-      }).then(async ({ success, result }) => {
-        if (success) {
-          const listData = JSON.parse(result);
-          this.listData = listData.data.pageData;
-          this.total = listData.data.totalRows;
-          this.listData.forEach((item) => {
-            if (item.personBiosignatures) {
-              item.personBiosignatures[0].path = `${this.ip}/video/picture/get?path=${item.personBiosignatures[0].path}`;
-            }
-          });
-        }
-      });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 人员列表选中 selection
-    handleSelectionChange(rows) {
-      this.rows = [];
-      rows.forEach((row) => {
-        this.rows.push(row.id);
-      });
-    },
-    // 档案管理 - 删除
-    handleDelete(row) {
-      let ids = [];
-      if (row.id) {
-        ids.push(row.id);
-      } else {
-        ids = this.rows;
-      }
-      this.$confirm("确定删除该人员?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-      }).then(async () => {
-        const loading = this.$loading({
-          lock: true,
-          text: "加载中...",
-          spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
-        });
-        const res = await delPerson({ ids });
-        loading.close();
-        this.reflash();
-        if (res.code === 10000) {
-          this.$message.success("删除成功");
-        }
-      });
-    },
-    // 新增 or 编辑
-    handleAddOrEdit(row) {
-      this.$refs["addOrEdit"].init(row);
-    },
-    // 刷新
-    reflash() {
-      this.pageNum = 1;
-      this.initPersonFiles();
-    },
-  },
-};
-</script>
-
-<style scoped>
-.person-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-/* 进出统计 */
-.charts {
-  height: 250px;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-  align-items: center;
-}
-</style>

+ 0 - 310
src/views/BioSafety/SaleAdmin.vue

@@ -1,310 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-17 15:50:33
- * @LastEditTime: 2021-12-25 14:32:26
- * @LastEditors: Please set LastEditors
- * @Description: 大门事件
- * @FilePath: \hyyfClient\src\views\BioSafety\DoorAdmin.vue
--->
-<template>
-  <div class="door-admin">
-    <!-- 筛选条件 -->
-    <query-conditions
-      :defaultEmit="true"
-      :formItems="formItems"
-      :propFormData="propFormData"
-      @getQueryParams="handleQuery"
-    ></query-conditions>
-
-    <!-- 表格 -->
-    <new-table
-      :title="title"
-      :listData="listData"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      :height="535"
-    >
-      <template v-slot:alarmPicture="slotProps">
-        <img
-          :src="slotProps.row.alarmPicture"
-          @click="clickImg(slotProps.row.alarmPicture)"
-          alt="死猪图片"
-          width="100%"
-        />
-      </template>
-
-      <!-- 回放按钮 -->
-      <template v-slot:handler="slotProps">
-        <el-button size="mini" @click="clickEvent(slotProps.row)">
-          查看回放
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="图片" :visible.sync="dialogVisible" width="50%">
-      <img :src="imgUrl" alt="死猪图片" width="100%" />
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="dialogVisible = false"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog title="回放视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 600px">
-        <iframe
-          v-if="videoVisible"
-          :src="'static/dahua/index.html?' + rtsp"
-          frameborder="0"
-          style="width: 100%; height: 100%"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">取 消</el-button>
-        <el-button type="primary" @click="videoVisible = false">
-          确 定
-        </el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "components/bioSafety/QueryConditions";
-import NewTable from "components/newTable/NewTable";
-import TableFooter from "../../components/TableFooter";
-
-import { formItems, propFormData } from "./doorAdmin/queryCondition.config";
-import { title, tableItems, tableShows } from "./doorAdmin/table.config";
-import { mapState } from "vuex";
-import { timeDate } from "../../utils/index";
-
-import {
-  getSaleAdmin,
-  // getCarWashTotal,
-  getCarWashVideo,
-} from "../../utils/chenApi";
-
-export default {
-  name: "DeadPig",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["ip"]),
-  },
-  data() {
-    return {
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: "", // 传给 BioTable 组件的 title
-      listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: "",
-      params: {},
-      dialogVisible: false,
-      imgUrl: "",
-      rtsp: "",
-      videoVisible: false,
-    };
-  },
-  mounted() {
-    this.formItems = formItems;
-    this.propFormData = propFormData;
-    this.propFormData.time = [
-      timeDate(new Date().getTime()),
-      timeDate(new Date().getTime()),
-    ];
-    this.title = title;
-    this.tableItems = tableItems;
-    this.tableShows = tableShows;
-    this.pigManage();
-    this.pigTotal();
-  },
-  methods: {
-    // 获取查询条件
-    handleQuery(params) {
-      this.params = params;
-      this.pageNum = 1;
-      this.pigManage();
-      this.pigTotal();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      // this.init();
-      this.pageNum = 1;
-      this.pigManage();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      // this.init();
-      this.pigManage();
-    },
-    // 死猪管理
-    pigManage() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      if (!this.params.time) {
-        this.params.time = [
-          timeDate(new Date().getTime()),
-          timeDate(new Date().getTime()),
-        ];
-      }
-      let queryParams = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        alarmStartDateString: this.params.time[0] + " 00:00:00",
-        alarmEndDateString: this.params.time[1] + " 23:59:59",
-      };
-      getSaleAdmin(queryParams).then(async (res) => {
-        loading.close();
-        if (res && res.code === 0) {
-          const result = JSON.parse(res.data.result);
-          this.listData = result.data.pageData;
-          console.log(this.listData);
-          this.listData.forEach((item) => {
-            item.alarmPicture = `${this.ip}/video/picture/get?alarmPicture=${item.alarmPicture}`;
-          });
-          this.total = parseInt(res.total);
-        } else {
-          res && this.$message.warning(res.message);
-        }
-      });
-    },
-    // 死猪管理 - 总数
-    pigTotal() {
-      // if (!this.params.time) {
-      //   this.params.time = [
-      //     timeDate(new Date().getTime() - 1000 * 60 * 60 * 24),
-      //     timeDate(new Date().getTime()),
-      //   ];
-      // }
-      // let queryParams = {
-      //   orgCodeList: [],
-      //   nodeCodeList: [
-      //     "1002874$1$0$0",
-      //     "1002875$1$0$0",
-      //     "1002876$1$0$0",
-      //     "1002877$1$0$0",
-      //     "1002878$1$0$0",
-      //     "1002879$1$0$0",
-      //     "1002880$1$0$0",
-      //     "1002881$1$0$0",
-      //     "1002882$1$0$0",
-      //     "1002883$1$0$0",
-      //     "1002884$1$0$0",
-      //     "1002885$1$0$0",
-      //     "1002886$1$0$0",
-      //     "1002887$1$0$0",
-      //     "1002888$1$0$0",
-      //     "1002889$1$0$0",
-      //     "1002890$1$0$0",
-      //     "1002891$1$0$0",
-      //     "1002892$1$0$0",
-      //     "1002893$1$0$0",
-      //     "1002894$1$0$0",
-      //     "1002895$1$0$0",
-      //     "1002896$1$0$0",
-      //     "1002897$1$0$0",
-      //     "1002898$1$0$0",
-      //     "1002899$1$0$0",
-      //     "1002900$1$0$0",
-      //     "1002901$1$0$0",
-      //     "1002902$1$0$0",
-      //     "1002903$1$0$0",
-      //     "1002904$1$0$0",
-      //     "1002905$1$0$0",
-      //     "1002906$1$0$0",
-      //     "1002907$1$0$0",
-      //     "1002908$1$0$0",
-      //     "1002909$1$0$0",
-      //     "1002910$1$0$0",
-      //     "1002911$1$0$0",
-      //     "1002912$1$0$0",
-      //     "1002913$1$0$0",
-      //     "1002939$1$0$0",
-      //     "1002939$1$0$1",
-      //     "1002939$1$0$2",
-      //     "1002939$1$0$3",
-      //     "1002939$1$0$4",
-      //     "1002939$1$0$5",
-      //     "1002939$1$0$6",
-      //     "1002939$1$0$7",
-      //     "1002939$1$0$8",
-      //     "1002939$1$0$9",
-      //     "1002940$1$0$0",
-      //     "1002940$1$0$1",
-      //     "1002940$1$0$2",
-      //     "1002940$1$0$3",
-      //     "1002940$1$0$4",
-      //     "1002940$1$0$5",
-      //     "1002940$1$0$6",
-      //     "1002940$1$0$7",
-      //     "1002939$1$0$10",
-      //     "1002939$1$0$11",
-      //     "1002939$1$0$12",
-      //     "1002939$1$0$13",
-      //     "1002939$1$0$14",
-      //     "1002939$1$0$15",
-      //   ],
-      //   deviceCategory: 1,
-      //   alarmStartDateString: this.params.time[0] + " 00:00:00",
-      //   alarmEndDateString: this.params.time[1] + " 23:59:59",
-      //   alarmType: 303,
-      //   dbType: 0,
-      // };
-      // getCarWashTotal(queryParams).then((res) => {
-      //   this.total = JSON.parse(res.result).data.value;
-      // });
-    },
-    // 点击图片放大
-    clickImg(url) {
-      this.dialogVisible = true;
-      this.imgUrl = url;
-    },
-    // 大门回放
-    clickEvent(row) {
-      getCarWashVideo({
-        happendTime: row.alarmDate,
-        channelName: row.alarmPosition,
-      }).then((res) => {
-        if (res.code === 0) {
-          this.rtsp = res.URL;
-          this.videoVisible = true;
-        } else {
-          this.$message.error("视频获取失败");
-        }
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.door-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 117
src/views/BioSafety/StiflingAdmin.vue

@@ -1,117 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-16 11:27:35
- * @LastEditTime: 2021-09-26 15:23:17
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\BioSafety\StiflingAdmin.vue
--->
-<template>
-  <div class="stifling-admin">
-    <!-- 筛选条件 -->
-    <query-conditions :formItems="formItems" :propFormData="propFormData" @getQueryParams="handleQuery"></query-conditions>
-
-    <!-- 表格 -->
-    <new-table :title="title" :listData="listData" :tableItems="tableItems" :shows="tableShows" :height="height" @selectionChange="handleSelectChange">
-      <!-- 按钮 -->
-      <template v-slot:handler="scope">
-        <el-button @click="handleClick(scope.row)">删除</el-button>
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="size"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange">
-    </table-footer>
-  </div>
-</template>
-
-<script>
-import QueryConditions from 'components/bioSafety/QueryConditions'
-import NewTable from 'components/newTable/NewTable'
-import TableFooter from "../../components/TableFooter";
-
-import { formItems, propFormData } from './stiflingAdmin/queryCondition.config'
-import { title, tableItems, tableShows } from './stiflingAdmin/table.config'
-
-export default {
-  name: "PersonAdmin",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter
-  },
-  data() {
-    return {
-      formItems: [], // 传给 QueryCondition 组件的 formItems
-      propFormData: {}, // 传给 QueryCondition 组件的 propFormData
-      title: '', // 传给 BioTable 组件的 title
-      // listData: [], // 传给 BioTable 组件的表格展示的值 listData
-      listData: [
-        {
-          place: '一一一',
-          startTime: '2222',
-          endTime: '3333',
-          long: '4444'
-        }
-      ],
-      tableItems: [], // 传给 BioTable 组件的表格的列表 tableItems
-      tableShows: {},
-      height: 535,
-      // table的翻页
-      total: 0,
-      size: 20,
-      pageNum: 1,
-      selectId: ''
-    }
-  },
-  mounted() {
-    this.formItems = formItems
-    this.propFormData = propFormData
-    this.title = title
-    this.tableItems = tableItems
-    this.tableShows = tableShows
-  },
-  methods: {
-    // 获取查询条件
-    handleQuery(params) {
-      console.log(params)
-    },
-    handleClick(row) {
-      console.log(row)
-    },
-    handleSelectChange(rows) {
-      console.log(rows)
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum= val;
-      this.init();
-    },
-    init() {
-      let params = {
-        pageNum: this.pageNum,
-        pageSize: this.size,
-        searchStr: this.keyword
-      }
-      console.log(params)
-      // 获取后端数据
-    }
-  },
-}
-</script>
-
-<style scoped>
-.stifling-admin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 51
src/views/BioSafety/carAdmin/queryCondition.config.js

@@ -1,51 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-12-21 13:55:49
- * @LastEditors: Please set LastEditors
- * @Description: 筛选条件的 formItems 和 propFormData
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
- */
-import { timeDate } from '../../../utils/index'
-
-const formItems1 = [
-  {
-    type: 'input',
-    label: '输入搜索:',
-    placeholder: '请输入完整车牌号',
-    field: 'name'
-  }
-]
-
-const propFormData1 = {
-  name: ''
-}
-
-const formItems2 = [
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
-]
-
-const propFormData2 = {
-  time: [timeDate(new Date().getTime()), timeDate(new Date().getTime())]
-}
-
-const formItems3 = [
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
-]
-
-const propFormData3 = {
-  time: [timeDate(new Date().getTime() - 1000 * 60 * 60 * 24 * 3), timeDate(new Date().getTime())]
-}
-
-export const formItems = [formItems1, formItems2, formItems3]
-export const propFormData = [propFormData1, propFormData2, propFormData3]

+ 0 - 189
src/views/BioSafety/carAdmin/table.config.js

@@ -1,189 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-12-24 10:23:57
- * @LastEditors: Please set LastEditors
- * @Description: 表格的配置
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
- */
-// export const titles = ['车辆档案', '门禁记录', '设备列表']
-export const titles = ['车辆档案记录', '车辆通行记录', '车辆洗消记录', "车辆烘干记录", '白名单记录', '黑名单记录']
-
-const tableItems1 = [
-  {
-    prop: 'carId',
-    label: '车辆编号',
-    minWidth: '120',
-    slotName: 'carId'
-  },
-  // {
-  //   prop: '',
-  //   label: '车辆图片',
-  //   minWidth: '120',
-  //   slotName: ''
-  // }
-  {
-    prop: 'carNum',
-    label: '车牌号',
-    minWidth: '120',
-    slotName: 'carNum'
-  },
-  {
-    label: '操作',
-    minWidth: '120',
-    slotName: 'handle'
-  }
-
-]
-const tableItems2 = [
-  {
-    prop: 'capTimeStr',
-    label: '时间',
-    minWidth: '120',
-    slotName: 'capTimeStr'
-  },
-  {
-    prop: 'originalPicPath',
-    label: '车辆图片',
-    minWidth: '150',
-    slotName: 'originalPicPath'
-  },
-  {
-    prop: 'carDirectStr',
-    label: '方向',
-    minWidth: '150',
-    slotName: 'carDirectStr'
-  },
-  {
-    prop: 'devChnName',
-    label: '区域',
-    minWidth: '150',
-    slotName: 'devChnName'
-  },
-  {
-    prop: 'carNum',
-    label: '车牌号',
-    minWidth: '150',
-    slotName: 'carNum'
-  },
-  {
-    prop: 'parkingCarColor',
-    label: '车辆颜色',
-    minWidth: '150',
-    slotName: 'parkingCarColor'
-  },
-  {
-    prop: 'parkingLot',
-    label: '所属停车场',
-    minWidth: '150',
-    slotName: 'parkingLot'
-  },
-  {
-    label: '操作',
-    minWidth: '120',
-    slotName: 'carHandle'
-  }
-]
-
-const tableItems3 = [
-  {
-    prop: 'alarmDate',
-    label: '时间',
-    minWidth: '150',
-    slotName: 'alarmDate'
-  },
-  {
-    prop: 'alarmPosition',
-    label: '地点',
-    minWidth: '100',
-    slotName: 'alarmPosition'
-  },
-  {
-    prop: 'alarmPicture',
-    label: '车辆图片',
-    minWidth: '150',
-    slotName: 'alarmPicture'
-  },
-  {
-    prop: 'alarmTypeName',
-    label: '类型',
-    minWidth: '150',
-    slotName: 'alarmTypeName'
-  },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handler'
-  }
-]
-
-const tableItems4 = [
-  {
-    prop: 'eventTime',
-    label: '发生时间',
-    minWidth: '150',
-    slotName: 'eventTime'
-  },
-  {
-    prop: 'location',
-    label: '发生地点',
-    minWidth: '150',
-    slotName: 'location'
-  },
-  {
-    prop: 'chekOk',
-    label: '烘干是否达标',
-    minWidth: '150',
-    slotName: 'chekOk'
-  },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handlerDrying'
-  }
-]
-
-const tableItems5 = [
-  {
-    prop: 'carId',
-    label: '车辆编号',
-    minWidth: '120',
-    slotName: 'carId'
-  },
-  {
-    prop: 'carNum',
-    label: '车牌号',
-    minWidth: '120',
-    slotName: 'carNum'
-  },
-  {
-    label: '操作',
-    minWidth: '120',
-    slotName: 'whiteHandle'
-  }
-];
-
-const tableItems6 = [
-  {
-    prop: 'carId',
-    label: '车辆编号',
-    minWidth: '120',
-    slotName: 'carId'
-  },
-  {
-    prop: 'carNum',
-    label: '车牌号',
-    minWidth: '120',
-    slotName: 'carNum'
-  },
-  {
-    label: '操作',
-    minWidth: '120',
-    slotName: 'blackHandle'
-  }
-];
-export const tableItems = [tableItems1, tableItems2, tableItems3, tableItems4, tableItems5, tableItems6]
-
-export const tableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 155
src/views/BioSafety/chart/ChartCarDrying.vue

@@ -1,155 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-05 16:50:40
- * @LastEditTime: 2021-12-05 17:01:00
- * @LastEditors: Please set LastEditors
- * @Description: 车辆管理 - 车辆烘干 - 温度详情图
- * @FilePath: \hyyfClient\src\views\BioSafety\chart\ChartCarDrying.vue
--->
-<template>
-  <div id="chart-car-dring" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-export default {
-  name: "ChartPigTemp",
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    tempList: {
-      type: Object,
-      default: function() {
-        return {
-          timeList: [],
-          tempList: [],
-        };
-      },
-    },
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    tempList: {
-      handler(newVal) {
-        if (newVal) {
-          this.myChart.clear();
-          this.init();
-        }
-      },
-      deep: true,
-    },
-  },
-  methods: {
-    init() {
-      let start = 0;
-      let end = this.tempList.timeList.length - 1;
-      let time = this.tempList.timeList;
-      let data = this.tempList.tempList;
-      // let name = this.tempList.name;
-      // this.tempList.list.forEach((item) => {
-      //   time.push(item.createTime);
-      //   data.push(item.value);
-      // });
-      let options = {
-        // title: {
-        //   text: `${name}温度曲线`,
-        //   left: "center",
-        // },
-        tooltip: {
-          trigger: "axis",
-        },
-        color: [this.color],
-        dataZoom: [
-          {
-            type: "inside",
-            startValue: start,
-            endValue: end,
-            show: false,
-          },
-        ],
-        xAxis: [
-          {
-            type: "category",
-            data: time,
-            axisPointer: {
-              type: "shadow",
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        yAxis: [
-          {
-            type: "value",
-            // name: "温度统计情况",
-            axisLabel: {
-              formatter: "{value}℃",
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        series: [
-          {
-            name: `${name}`,
-            type: "line",
-            // stack: 'Total',
-            smooth: true,
-            areaStyle: {},
-            emphasis: {
-              focus: "series",
-            },
-            itemStyle: {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label: {
-                  show: true,
-                  textStyle: {
-                    fontSize: 14,
-                  },
-                },
-              },
-            },
-            data: data,
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-car-dring")
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 144
src/views/BioSafety/chart/ChartElectro.vue

@@ -1,144 +0,0 @@
-<template>
-  <div :id="'chart-electro-pie-' + id" style="width: 30%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-
-export default {
-  name: "ChartElectro",
-  computed: {
-    ...mapState(["color"]),
-  },
-  props: {
-    id: {
-      type: String,
-      default: () => "0",
-    },
-    total: {
-      type: Number,
-      default: () => 0,
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    total(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-  },
-  methods: {
-    init() {
-      let data = [{ name: "总进出人次", value: this.total }];
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ",");
-      };
-      let total = data.reduce((a, b) => {
-        return a + b.value * 1;
-      }, 0);
-      let options = {
-        color: [this.color],
-        title: [
-          {
-            text:
-              "{name|" + "总进出人次" + "}\n{val|" + formatNumber(total) + "}",
-            top: "center",
-            left: "center",
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: "normal",
-                  color: "#666666",
-                  padding: [10, 0],
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: "bold",
-                  color: "#333333",
-                },
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            type: "pie",
-            radius: ["55%", "73%"],
-            center: ["50%", "50%"],
-            data: data,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: "#fff",
-                borderWidth: 2,
-              },
-            },
-            labelLine: {
-              normal: {
-                length: 20,
-                length2: 120,
-                lineStyle: {
-                  color: "#e6e6e6",
-                },
-              },
-            },
-            label: {
-              normal: {
-                show: false,
-                formatter: (params) => {
-                  return (
-                    "{icon|●}{name|" +
-                    params.name +
-                    "}{value|" +
-                    formatNumber(params.value) +
-                    "}"
-                  );
-                },
-                padding: [0, -100, 25, -100],
-                rich: {
-                  icon: {
-                    fontSize: 16,
-                  },
-                  name: {
-                    fontSize: 14,
-                    padding: [0, 10, 0, 4],
-                    color: "#666666",
-                  },
-                  value: {
-                    fontSize: 18,
-                    fontWeight: "bold",
-                    color: "#333333",
-                  },
-                },
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options, false);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-electro-pie-" + this.id)
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 131
src/views/BioSafety/chart/CostHistogram.vue

@@ -1,131 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-12 09:10:42
- * @LastEditTime: 2021-12-21 13:29:30
- * @LastEditors: Please set LastEditors
- * @Description: 成本分析的柱状图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostHistogram.vue
--->
-<template>
-  <div class="cost-histogram">
-    <div id="costHistogram"></div>
-  </div>
-</template>
-<script>
-import { mapState } from "vuex";
-export default {
-  props: {
-    timeList: {
-      type: Array,
-      default: () => [],
-    },
-    dataList: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  methods: {
-    init() {
-      let options = {
-        color: [this.color],
-        tooltip: {
-          trigger: "axis",
-          axisPointer: {
-            type: "none",
-          },
-        },
-        grid: {
-          left: "3%",
-          right: "12%",
-          bottom: "6%",
-          containLabel: true,
-        },
-        xAxis: {
-          name: "时间",
-          type: "category",
-          data: this.timeList,
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-          // axisPointer: {
-          //   show: false,
-          // },
-          // axisTick: {
-          //   alignWithLabel: true,
-          // },
-        },
-        yAxis: {
-          name: "人次",
-          type: "value",
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        },
-
-        series: [
-          {
-            name: "人次",
-            type: "bar",
-            barWidth: "15%",
-            data: this.dataList,
-            label: {
-              show: true,
-              verticalAlign: "bottom",
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options, false);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("costHistogram"));
-    this.init();
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    dataList: {
-      handler() {
-        this.myChart.clear();
-        this.init();
-      },
-    },
-    timeList: {
-      handler() {
-        this.myChart.clear();
-        this.init();
-      },
-    },
-  },
-};
-</script>
-<style scoped>
-.cost-histogram {
-  display: inline-block;
-  flex: 1;
-  height: 100%;
-}
-#costHistogram {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 30
src/views/BioSafety/deadPig/queryCondition.config.js

@@ -1,30 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-12-02 09:28:23
- * @LastEditors: Please set LastEditors
- * @Description: 筛选条件的 formItems 和 propFormData
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
- */
-import { timeDate } from '../../../utils/index'
-
-export const formItems = [
-  // {
-  //   type: 'select',
-  //   label: '位置:',
-  //   placeholder: '请选择位置',
-  //   field: 'place',
-  //   options: []
-  // },
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
-]
-
-export const propFormData = {
-  // place: '',
-  time: [timeDate(new Date().getTime() - 1000*60*60*24), timeDate(new Date().getTime())]
-}

+ 0 - 39
src/views/BioSafety/deadPig/table.config.js

@@ -1,39 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-12-17 14:31:32
- * @LastEditors: Please set LastEditors
- * @Description: 表格的配置
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
- */
-export const title = '数据列表'
-
-export const tableItems = [
-  {
-    prop: 'alarmDate',
-    label: '开始时间',
-    minWidth: '100',
-    slotName: 'alarmDate'
-  },
-  {
-    prop: 'alarmPicture',
-    label: '图片',
-    width: '300',
-    slotName: 'alarmPicture'
-  },
-  {
-    prop: 'alarmPosition',
-    label: '位置',
-    minWidth: '150',
-    slotName: 'alarmPosition'
-  },
-  {
-    label: '操作',
-    minWidth: '100',
-    slotName: 'handler'
-  }
-]
-
-export const tableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 30
src/views/BioSafety/doorAdmin/queryCondition.config.js

@@ -1,30 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-12-24 14:36:07
- * @LastEditors: Please set LastEditors
- * @Description: 筛选条件的 formItems 和 propFormData
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
- */
-import { timeDate } from '../../../utils/index'
-
-export const formItems = [
-  // {
-  //   type: 'select',
-  //   label: '位置:',
-  //   placeholder: '请选择位置',
-  //   field: 'place',
-  //   options: []
-  // },
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
-]
-
-export const propFormData = {
-  // place: '',
-  time: [timeDate(new Date().getTime() - 1000*60*60*24), timeDate(new Date().getTime())]
-}

+ 0 - 39
src/views/BioSafety/doorAdmin/table.config.js

@@ -1,39 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-12-17 14:31:32
- * @LastEditors: Please set LastEditors
- * @Description: 表格的配置
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
- */
-export const title = '数据列表'
-
-export const tableItems = [
-  {
-    prop: 'alarmDate',
-    label: '开始时间',
-    minWidth: '100',
-    slotName: 'alarmDate'
-  },
-  {
-    prop: 'alarmPicture',
-    label: '图片',
-    width: '300',
-    slotName: 'alarmPicture'
-  },
-  {
-    prop: 'alarmPosition',
-    label: '位置',
-    minWidth: '150',
-    slotName: 'alarmPosition'
-  },
-  {
-    label: '操作',
-    minWidth: '100',
-    slotName: 'handler'
-  }
-]
-
-export const tableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 204
src/views/BioSafety/personAdmin/AddOrEdit.vue

@@ -1,204 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-25 17:22:27
- * @LastEditTime: 2021-12-25 18:52:27
- * @LastEditors: Please set LastEditors
- * @Description: 人员档案 - 增加人员 or 编辑人员
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\AddOrEdit.vue
--->
-<template>
-  <el-dialog
-    :title="title"
-    :visible.sync="dialogVisible"
-    width="30%"
-    @close="handleCancel"
-  >
-    <div class="reset-form">
-      <el-form
-        label-width="120px"
-        size="small"
-        :rules="rules"
-        :model="form"
-        ref="form"
-      >
-        <el-form-item label="姓名:" prop="name">
-          <el-input v-model="form.name"></el-input>
-        </el-form-item>
-        <el-form-item label="部门:" prop="departmentId">
-          <el-select v-model="form.departmentId" style="width: 100%">
-            <el-option
-              v-for="item in departmentList"
-              :key="item.label"
-              :value="item.value"
-              :label="item.label"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="图片:">
-          <el-upload
-            class="upload-demo"
-            action="''"
-            :auto-upload="false"
-            :on-change="handleSuccess"
-            :on-remove="handleRemove"
-            :before-remove="beforeRemove"
-            :limit="1"
-            :on-exceed="handleExceed"
-            :file-list="file"
-          >
-            <el-button size="small" type="primary">选择图片</el-button>
-            <!-- <template #tip>
-              <div class="el-upload__tip">
-                jpg/png files with a size less than 500kb
-              </div>
-            </template> -->
-          </el-upload>
-        </el-form-item>
-      </el-form>
-    </div>
-    <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="handleCancel">取 消</el-button>
-      <el-button size="small" type="primary" @click="handleSubmit">
-        确 定
-      </el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import { addPerson, addPersonPicture, addPictureToPerson } from "@/utils/chenApi.js";
-import { getFaceToken } from "@/utils/api.js";
-export default {
-  data() {
-    return {
-      title: "",
-      dialogVisible: false,
-      form: {
-        id: undefined,
-        name: "",
-        departmentId: "",
-      },
-      rules: {
-        name: [{ required: true, message: "姓名不可以为空", trigger: "blur" }],
-        departmentId: [
-          { required: true, message: "部门需要选择", trigger: "blur" },
-        ],
-      },
-      departmentList: [
-        {
-          value: 4,
-          label: "维修部门",
-        },
-        {
-          value: 2,
-          label: "技术部门",
-        },
-        {
-          value: 5,
-          label: "基层部门",
-        },
-      ],
-      file: [],
-    };
-  },
-  methods: {
-    init(row) {
-      if (row) {
-        this.title = "编辑人员";
-        this.$nextTick(() => {
-          this.form = { ...row };
-        });
-      } else {
-        this.title = "新增人员";
-      }
-      this.dialogVisible = true;
-    },
-    handleSubmit() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      let request = addPerson;
-      if (this.form.id) {
-        // request = postDeviceEdit;
-      }
-      request({ ...this.form }).then(async (res) => {
-        loading.close();
-        if (res.code === 0) {
-          try {
-            const formData = new FormData();
-            formData.append("file", this.file[0]);
-            const { token } = await getFaceToken({});
-            const { data } = await addPersonPicture(formData, token);
-            console.log(data);
-            if(data) {
-              let params = {
-                personId: res.data.data.id,
-                path: data
-              }
-              addPictureToPerson(params).then(res => {
-                if(res.code == 0) {
-                 this.$message.success('新增档案成功!');
-                 this.handleCancel();
-                  this.$emit("reflash");
-                }
-              })
-            }
-          } catch (err) {
-            this.$message.error(`照片${this.form.id ? "修改" : "添加"}成功`);
-          }
-          // this.$message.success(`${this.form.id ? "修改" : "添加"}成功`);
-          // this.handleCancel();
-          // this.$emit("reflash");
-        } else {
-          this.$message.error(`${this.form.id ? "修改" : "添加"}失败`);
-        }
-        this.file = [];
-      });
-    },
-    // 取消
-    handleCancel() {
-      this.dialogVisible = false;
-      if (this.form.id) {
-        this.$nextTick(() => {
-          this.$refs["form"].resetFields();
-        });
-      }
-    },
-    // 图片接口
-    handleRemove() {
-      this.file = [];
-    },
-    handleExceed() {
-      this.$message.warning("请注意,只能选择一张图片");
-    },
-    beforeRemove(file) {
-      return this.$confirm(`取消上传${file.name} ?`);
-    },
-    handleSuccess(file) {
-      const isImg = file.raw.type === 'image/jpeg' || file.raw.type === 'image/png';
-      const isLt2M = file.size / 1024 / 1024 < 2;
-      if(!isLt2M) {
-        this.$message.error('上传头像图片大小不能超过 2MB!');
-        this.file = [];
-      }
-      if(!isImg) {
-        this.$message.error('上传头像图片只能是JPG或者png格式的图片!');
-        this.file = [];
-      } else {
-        this.file.push(file.raw);
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.reset-form {
-  margin-right: 20px;
-}
-.dialog-footer {
-  margin-right: 20px;
-}
-</style>

+ 0 - 80
src/views/BioSafety/personAdmin/queryCondition.config.js

@@ -1,80 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-12-21 10:01:09
- * @LastEditors: Please set LastEditors
- * @Description: 筛选条件的 formItems 和 propFormData
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
- */
-import { timeDate } from '../../../utils/index'
-
-const formItems1 = [
-  {
-    type: 'select',
-    label: '部门:',
-    placeholder: '请选择部门',
-    field: 'departmentId',
-    options: [
-      {
-        value: 4,
-        label: '维修部门'
-      },
-      {
-        value: 2,
-        label: '技术部门'
-      },
-      {
-        value: 5,
-        label: '基层部门'
-      }
-    ]
-  }
-]
-
-const propFormData1 = {
-  departmentId: 5
-}
-
-const formItems2 = [
-  {
-    type: 'input',
-    label: '输入搜索:',
-    placeholder: '请输入姓名',
-    field: 'name'
-  },
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time',
-  }
-]
-
-const propFormData2 = {
-  name: '',
-  time: [timeDate(new Date().getTime()), timeDate(new Date().getTime())]
-}
-
-const formItems3 = [
-  {
-    type: 'input',
-    label: '输入搜索:',
-    placeholder: '请输入姓名',
-    field: 'name'
-  },
-  {
-    type: 'select',
-    label: '区域:',
-    placeholder: '请选择区域',
-    field: 'region',
-    options: []
-  }
-]
-
-const propFormData3 = {
-  name: '',
-  region: ''
-}
-
-export const formItems = [formItems1, formItems2, formItems3]
-export const propFormData = [propFormData1, propFormData2, propFormData3]

+ 0 - 118
src/views/BioSafety/personAdmin/table.config.js

@@ -1,118 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-12-22 17:41:01
- * @LastEditors: Please set LastEditors
- * @Description: 表格的配置
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
- */
-export const titles = ['人员列表', '门禁记录', '人员列表']
-
-const tableItems1 = [
-  {
-    prop: 'code',
-    label: '编号',
-    minWidth: '100',
-    slotName: 'code'
-  },
-  {
-    prop: 'personBiosignatures',
-    label: '人员图片',
-    minWidth: '150',
-    slotName: 'personBiosignatures'
-  },
-  {
-    prop: 'name',
-    label: '姓名',
-    minWidth: '150',
-    slotName: 'name'
-  },
-  {
-    prop: 'sex',
-    label: '性别',
-    minWidth: '150',
-    slotName: 'sex'
-  },
-  {
-    prop: 'departmentName',
-    label: '所属部门',
-    minWidth: '150',
-    slotName: 'departmentName'
-  },
-  {
-    prop: 'status',
-    label: '人员状态',
-    minWidth: '100',
-    slotName: 'status'
-  },
-  {
-    label: '操作',
-    minWidth: '100',
-    slotName: 'handler'
-  }
-]
-
-const tableItems2 = [
-  {
-    prop: 'swingTime',
-    label: '时间',
-    minWidth: '120',
-    slotName: 'swingTime'
-  },
-  {
-    prop: 'recordImage',
-    label: '人员图片',
-    minWidth: '150',
-    slotName: 'recordImage'
-  },
-  {
-    prop: 'personName',
-    label: '姓名',
-    minWidth: '120',
-    slotName: 'personName'
-  },
-  {
-    prop: 'channelName',
-    label: '进入区域',
-    minWidth: '120',
-    slotName: 'channelName'
-  }
-]
-
-const tableItems3 = [
-  {
-    prop: 'photo',
-    label: '人员图片',
-    minWidth: '150',
-    slotName: 'photo'
-  },
-  {
-    prop: 'name',
-    label: '姓名',
-    minWidth: '150',
-    slotName: 'name'
-  },
-  {
-    prop: 'location',
-    label: '位置',
-    minWidth: '150',
-    slotName: 'location'
-  },
-  {
-    prop: 'region',
-    label: '负责区域',
-    minWidth: '150',
-    slotName: 'region'
-  },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handler'
-  }
-]
-
-export const tableItems = [tableItems1, tableItems2, tableItems3]
-
-export const tableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 20
src/views/BioSafety/stiflingAdmin/queryCondition.config.js

@@ -1,20 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 15:19:29
- * @LastEditTime: 2021-09-26 14:35:13
- * @LastEditors: Please set LastEditors
- * @Description: 筛选条件的 formItems 和 propFormData
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\queryCondition.config.js
- */
-export const formItems = [
-  {
-    type: 'datepicker',
-    label: '时间:',
-    placeholder: ['开始时间', '结束时间'],
-    field: 'time'
-  }
-]
-
-export const propFormData = {
-  time: []
-}

+ 0 - 45
src/views/BioSafety/stiflingAdmin/table.config.js

@@ -1,45 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-18 16:06:51
- * @LastEditTime: 2021-09-28 14:04:57
- * @LastEditors: Please set LastEditors
- * @Description: 表格的配置
- * @FilePath: \hyyfClient\src\views\BioSafety\personAdmin\table.config.js
- */
-export const title = '数据列表'
-
-export const tableItems = [
-  {
-    prop: 'place',
-    label: '位置',
-    minWidth: '100',
-    slotName: 'place'
-  },
-  {
-    prop: 'startTime',
-    label: '开始时间',
-    minWidth: '150',
-    slotName: 'startTime'
-  },
-  {
-    prop: 'endTime',
-    label: '结束时间',
-    minWidth: '150',
-    slotName: 'endTime'
-  },
-  {
-    prop: 'long',
-    label: '耗时',
-    minWidth: '150',
-    slotName: 'long'
-  },
-  {
-    label: '操作',
-    minWidth: '150',
-    slotName: 'handler'
-  }
-]
-
-export const tableShows = {
-  showIndex: false, showSelect: true
-}

+ 0 - 258
src/views/DeviceMana/Device.vue

@@ -1,258 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-07 14:27:28
- * @LastEditTime: 2021-12-27 09:15:07
- * @LastEditors: Please set LastEditors
- * @Description: 设备管理页面
- * @FilePath: \hyyfClient\src\views\DeviceMana\Device.vue
--->
-<template>
-  <div class="device">
-    <div class="manage-items">
-      <manage-item
-        v-for="(item, index) in manageItems"
-        :key="item.title"
-        v-bind="item"
-      >
-        <template #icon>
-          <div :class="manageItemClass[index]"></div>
-        </template>
-      </manage-item>
-    </div>
-    <new-table
-      v-bind="tableData"
-      :listData="listData"
-      @selectionChange="selectionChange"
-    >
-      <!-- 右上角新增按钮 -->
-      <template #right>
-        <el-button v-if="hasPerm('device:add')" size="mini" @click="handleAdd">
-          新增设备
-        </el-button>
-        <el-button
-          v-if="hasPerm('device:del')"
-          size="mini"
-          @click="handleDelete(true)"
-        >
-          批量删除
-        </el-button>
-      </template>
-
-      <!-- table-col -->
-      <template #state="scope">
-        <el-tag
-          size="small"
-          :type="scope.row.state === 1 ? 'success' : 'danger'"
-        >
-          {{ scope.row.state === 1 ? "正常" : "异常" }}
-        </el-tag>
-      </template>
-
-      <template #handler="slotProps">
-        <el-button
-          v-if="hasPerm('device:edit')"
-          type="text"
-          @click="handleEdit(slotProps.row)"
-        >
-          编辑
-        </el-button>
-        <el-button
-          v-if="hasPerm('device:del')"
-          type="text"
-          @click="handleDelete(false, slotProps.row)"
-        >
-          删除
-        </el-button>
-      </template>
-    </new-table>
-    <table-footer
-      v-bind="tableFooterData"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <add-or-edit ref="addOrEdit" @reflash="reflash"></add-or-edit>
-  </div>
-</template>
-<script>
-import ManageItem from "./device/ManageItem.vue";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-import AddOrEdit from "./device/AddOrEdit.vue";
-
-import { tableData } from "./device/table.config";
-import {
-  getDeviceList,
-  postDeviceDel,
-  getDeviceSummer,
-} from "@/utils/chenApi.js";
-
-export default {
-  components: {
-    ManageItem,
-    NewTable,
-    TableFooter,
-    AddOrEdit,
-  },
-  data() {
-    return {
-      manageItems: [
-        {
-          title: "设备总数",
-          num: "0",
-        },
-        {
-          title: "故障设备",
-          num: "0",
-        },
-        {
-          title: "设备故障率",
-          num: "0%",
-        },
-      ],
-      manageItemClass: ["total", "badCount", "badPercent"],
-      tableFooterData: {
-        totals: 0,
-        size: 20,
-        pageNum: 1,
-      },
-      tableData: tableData,
-      listData: [],
-      rows: [],
-    };
-  },
-  methods: {
-    // size 改变
-    sizeChange(val) {
-      this.tableFooterData.size = val;
-      this.tableFooterData.pageNum = 1;
-      this.initList();
-      this.initSummer();
-    },
-    // 页数改变
-    pageChange(val) {
-      this.tableFooterData.pageNum = val;
-      this.initList();
-    },
-    // 新增事件
-    handleAdd() {
-      this.$refs["addOrEdit"].init();
-    },
-    // 编辑事件
-    handleEdit(row) {
-      this.$refs["addOrEdit"].init(row);
-    },
-    // 选中
-    selectionChange(rows) {
-      this.rows = rows;
-    },
-    // 删除事件
-    handleDelete(flag, row) {
-      if (flag && this.rows.length === 0) {
-        this.$message.warning("请选中设备再删除");
-        return;
-      }
-
-      let ids = "";
-      if (flag) {
-        const items = [];
-        this.rows.forEach((item) => {
-          items.push(item.id);
-        });
-        ids = items.join(",");
-      } else {
-        ids += row.id;
-      }
-      this.$confirm("确定删除该设备?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-      }).then(async () => {
-        const loading = this.$loading({
-          lock: true,
-          text: "加载中...",
-          spinner: "el-icon-loading",
-          background: "rgba(0, 0, 0, 0.7)",
-        });
-        const res = await postDeviceDel({
-          id: ids,
-        });
-        loading.close();
-        this.reflash();
-        if (res.code === 10000) {
-          this.$message.success("删除成功");
-        }
-      });
-    },
-    initList() {
-      getDeviceList({
-        pageNo: this.tableFooterData.pageNum,
-        pageSize: this.tableFooterData.size,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.listData = res.data.content;
-          this.tableFooterData.totals = res.data.totalElements;
-        } else {
-          this.$message.warning(res.message);
-        }
-      });
-    },
-    initSummer() {
-      getDeviceSummer({
-        bit: 2,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.manageItems[0].num = res.data.total;
-          this.manageItems[1].num = res.data.num;
-          this.manageItems[2].num = res.data.rate;
-        } else {
-          this.manageItems[0].num = "0";
-          this.manageItems[1].num = "0";
-          this.manageItems[2].num = "0";
-          this.$message.warning(res.message);
-        }
-      });
-    },
-    reflash() {
-      this.initSummer();
-      this.tableFooterData.pageNum = 1;
-      this.initList();
-    },
-  },
-  mounted() {
-    this.initList();
-    this.initSummer();
-  },
-};
-</script>
-<style scoped>
-.device {
-  padding: 20px 20px 0;
-}
-.manage-items {
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-}
-
-/* 设备总数的 icon */
-.total {
-  background: url("~@/assets/images/device/设备总数.svg") no-repeat;
-  background-size: contain;
-  width: 40px;
-  height: 40px;
-}
-/* 故障设备的 icon */
-.badCount {
-  background: url("~@/assets/images/device/设备故障.svg") no-repeat;
-  background-size: contain;
-  width: 50px;
-  height: 50px;
-}
-/* 设备故障率的 icon */
-.badPercent {
-  background: url("~@/assets/images/device/故障率统计.svg") no-repeat;
-  background-size: contain;
-  width: 45px;
-  height: 45px;
-}
-</style>

+ 0 - 155
src/views/DeviceMana/device/AddOrEdit.vue

@@ -1,155 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-08 09:57:19
- * @LastEditTime: 2021-12-17 09:59:52
- * @LastEditors: Please set LastEditors
- * @Description: 设备详情 - 新增 or 编辑 设备 的 dialog
- * @FilePath: \hyyfClient\src\views\DeviceMana\device\AddOrEdit.vue
--->
-<template>
-  <el-dialog
-    :title="title"
-    :visible.sync="dialogVisible"
-    width="30%"
-    @close="handleCancel"
-  >
-    <div class="reset-form">
-      <el-form
-        label-width="120px"
-        size="small"
-        :rules="rules"
-        :model="form"
-        ref="form"
-      >
-        <el-form-item label="设备名称:" prop="deviceName">
-          <el-input v-model="form.deviceName"></el-input>
-        </el-form-item>
-        <el-form-item label="设备编号:" prop="deviceCode">
-          <el-input v-model="form.deviceCode"></el-input>
-        </el-form-item>
-        <el-form-item label="型号:" prop="deviceType">
-          <el-input v-model="form.deviceType"></el-input>
-        </el-form-item>
-        <el-form-item label="厂家:" prop="factory">
-          <el-input v-model="form.factory"></el-input>
-        </el-form-item>
-        <el-form-item label="维保人:" prop="worker">
-          <el-input v-model="form.worker"></el-input>
-        </el-form-item>
-        <el-form-item label="基本参数:" prop="mainParams">
-          <el-input v-model="form.mainParams"></el-input>
-        </el-form-item>
-        <el-form-item label="状态:" prop="state">
-          <el-select v-model="form.state" style="width: 100%">
-            <el-option
-              v-for="item in statusItems"
-              :key="item.label"
-              :value="item.value"
-              :label="item.label"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="维修记录:" prop="record">
-          <el-input v-model="form.record"></el-input>
-        </el-form-item>
-      </el-form>
-    </div>
-    <span slot="footer" class="dialog-footer">
-      <el-button size="small" @click="handleCancel">取 消</el-button>
-      <el-button size="small" type="primary" @click="handleSubmit">
-        确 定
-      </el-button>
-    </span>
-  </el-dialog>
-</template>
-<script>
-import { postDeviceAdd, postDeviceEdit } from "@/utils/chenApi.js";
-export default {
-  data() {
-    return {
-      title: "",
-      dialogVisible: false,
-      form: {
-        id: undefined,
-        deviceName: "",
-        deviceCode: "",
-        deviceType: "",
-        factory: "",
-        worker: "",
-        mainParams: "",
-        state: "",
-        record: "",
-      },
-      rules: {
-        deviceName: [
-          { required: true, message: "设备名称不可以为空", trigger: "blur" },
-        ],
-        state: [
-          { required: true, message: "设备状态需要选择", trigger: "blur" },
-        ],
-      },
-      statusItems: [
-        {
-          label: "正常",
-          value: 1,
-        },
-        {
-          label: "异常",
-          value: 2,
-        },
-      ],
-    };
-  },
-  methods: {
-    init(row) {
-      if (row) {
-        this.title = "编辑设备";
-        this.$nextTick(() => {
-          this.form = { ...row };
-        });
-      } else {
-        this.title = "新增设备";
-      }
-      this.dialogVisible = true;
-    },
-    handleSubmit() {
-      const loading = this.$loading({
-        lock: true,
-        text: "加载中...",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)",
-      });
-      let request = postDeviceAdd;
-      if (this.form.id) {
-        request = postDeviceEdit;
-      }
-      request({ ...this.form }).then((res) => {
-        loading.close();
-        if (res.code === 10000) {
-          this.$message.success(`${this.form.id ? "修改" : "添加"}成功`);
-          this.handleCancel();
-          this.$emit("reflash");
-        }
-      });
-    },
-    // 取消
-    handleCancel() {
-      this.dialogVisible = false;
-      if (this.form.id) {
-        this.$nextTick(() => {
-          this.$refs["form"].resetFields();
-        });
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.reset-form {
-  margin-right: 20px;
-}
-.dialog-footer {
-  margin-right: 20px;
-}
-</style>

+ 0 - 50
src/views/DeviceMana/device/ManageItem.vue

@@ -1,50 +0,0 @@
-<!--
- * @Author: East
- * @Date: 2021-12-08 08:39:57
- * @LastEditTime: 2021-12-08 09:04:13
- * @LastEditors: Please set LastEditors
- * @Description: 上面的一项
- * @FilePath: \hyyfClient\src\views\DeviceMana\device\ManageItem.vue
--->
-<template>
-  <div class="manage-item">
-    <div class="icon">
-      <slot name="icon"></slot>
-    </div>
-    <div class="data">
-      <div class="title">{{ title }}</div>
-      <div class="num">{{ num }}</div>
-    </div>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    title: {
-      type: String,
-      required: true,
-    },
-    num: {
-      type: String,
-      default: "暂无数据",
-    },
-  },
-};
-</script>
-<style scoped>
-.manage-item {
-  border: 1px solid #ddd;
-  height: 100px;
-  width: 18%;
-  background-color: #fff;
-  display: flex;
-  flex-direction: row;
-  align-items: center;
-}
-.icon {
-  margin: 0 10px 0 30px;
-}
-.title {
-  font-size: 1rem;
-}
-</style>

+ 0 - 71
src/views/DeviceMana/device/table.config.js

@@ -1,71 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-12-08 09:47:30
- * @LastEditTime: 2021-12-09 16:13:06
- * @LastEditors: Please set LastEditors
- * @Description: 设备详情 - 表格参数
- * @FilePath: \hyyfClient\src\views\DeviceMana\device\table.config.js
- */
-export const tableData = {
-  title: "设备列表",
-  shows: {
-    showIndex: false,
-    showSelect: true,
-  },
-  tableItems: [
-    {
-      prop: "deviceName",
-      label: "设备名称",
-      minWidth: 100,
-      slotName: "deviceName",
-    },
-    {
-      prop: "deviceCode",
-      label: "设备编号",
-      minWidth: 100,
-      slotName: "deviceCode",
-    },
-    {
-      prop: "deviceType",
-      label: "型号",
-      minWidth: 100,
-      slotName: "deviceType",
-    },
-    {
-      prop: "factory",
-      label: "厂家",
-      minWidth: 100,
-      slotName: "factory",
-    },
-    {
-      prop: "worker",
-      label: "维保人",
-      minWidth: 100,
-      slotName: "worker",
-    },
-    {
-      prop: "mainParams",
-      label: "基本参数",
-      minWidth: 120,
-      slotName: "mainParams",
-    },
-    {
-      prop: "state",
-      label: "状态",
-      minWidth: 120,
-      slotName: "state",
-    },
-    {
-      prop: "record",
-      label: "维修记录",
-      minWidth: 120,
-      slotName: "record",
-    },
-    {
-      label: "操作",
-      minWidth: 120,
-      slotName: "handler",
-    },
-  ],
-  height: 470,
-}

+ 0 - 485
src/views/Env/DrinkWater.vue

@@ -1,485 +0,0 @@
-<template>
-  <div class="drinkWater">
-    <div class="reply" :style="{ color: color }">全场饮水情况</div>
-    <x-form
-      :formItems="formItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    ></x-form>
-    <div class="echarts" v-if="allWaterCount && allWaterList.length > 0">
-      <div class="echarts-l">
-        <chart-water-pie :waterCount="allWaterCount"></chart-water-pie>
-      </div>
-      <div class="echarts-r">
-        <chart-water :dataValue="allWaterList"></chart-water>
-      </div>
-    </div>
-    <div class="echarts" v-else>
-      <el-empty description="暂无数据" style="width: 100%;"></el-empty>
-    </div>
-    <br />
-    <div class="reply" :style="{ color: color }">饮用水详情</div>
-    <el-skeleton
-      style="width: 100%; height: 150px;"
-      :loading="loading"
-      animated
-    >
-      <div class="carousel">
-        <swiper class="swiper" :options="swiperOption">
-          <swiper-slide
-            v-for="(item, i) in list"
-            :key="i"
-            style="padding-top: 10px"
-          >
-            <div class="box">
-              <p>{{ item.room }}</p>
-              <div class="flex">
-                <div>
-                  <i class="icon1"></i>
-                </div>
-                <div>
-                  <span>{{
-                    item.water == null ? "设备暂无数据" : item.water + "吨"
-                  }}</span>
-                </div>
-              </div>
-            </div>
-          </swiper-slide>
-          <div class="swiper-pagination" slot="pagination"></div>
-          <div class="swiper-button-prev" slot="button-prev"></div>
-          <div class="swiper-button-next" slot="button-next"></div>
-        </swiper>
-      </div>
-    </el-skeleton>
-    <br />
-    <div class="reply" :style="{ color: color }">筛选查询</div>
-    <x-form
-      :formItems="selectItems"
-      :day="day1"
-      @setDay="setDay1"
-      @setChange="setChange"
-      @onClickType="onClickType1"
-    ></x-form>
-    <div class="echarts" v-if="waterList.length > 0">
-      <div class="echarts-l">
-        <chart-water-pie :id="'1'" :waterCount="waterCount"></chart-water-pie>
-      </div>
-      <div class="echarts-r">
-        <chart-water
-          :id="'1'"
-          :dataValue="waterList"
-          :room="waterRoom"
-        ></chart-water>
-      </div>
-    </div>
-    <div class="echarts" v-else>
-      <el-empty description="暂无数据" style="width: 100%;"></el-empty>
-    </div>
-  </div>
-</template>
-
-<script>
-import XForm from "@/components/XForm";
-import ChartWaterPie from "@/views/Env/chart/ChartWaterPie";
-import ChartWater from "@/views/dashboard/chart/ChartWater";
-import { swiper, swiperSlide } from "vue-awesome-swiper";
-import "swiper/css/swiper.css";
-import { mapState } from "vuex";
-import {
-  getAllDayWater,
-  getByFloor,
-  getListAllWater,
-  getListWater,
-  getSchool,
-  getUid,
-} from "../../utils/api";
-import { timeDate } from "../../utils";
-
-export default {
-  name: "DrinkWater",
-  components: {
-    XForm,
-    ChartWaterPie,
-    ChartWater,
-    swiper,
-    swiperSlide,
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      formItems: [
-        {
-          id: 1,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 2,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 3,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 6,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-        // {
-        //   id: 5,
-        //   type: "button",
-        //   text: "导出数据",
-        //   col: 2,
-        //   click: "derive",
-        // },
-      ],
-      day: 1,
-      swiperOption: {
-        slidesPerView: 8,
-        spaceBetween: 30,
-        autoplay: {
-          delay: 2500,
-          disableOnInteraction: false,
-        },
-        pagination: {
-          el: ".swiper-pagination",
-          type: "progressbar",
-        },
-        navigation: {
-          nextEl: ".swiper-button-next",
-          prevEl: ".swiper-button-prev",
-        },
-      },
-      selectItems: [
-        {
-          id: 1,
-          type: "select",
-          label: "栋舍:",
-          placeholder: "请选择栋舍",
-          field: "floorId",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 2,
-          type: "select",
-          label: "楼层:",
-          placeholder: "请选择楼层",
-          field: "uid",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 10,
-          type: "select",
-          label: "单元:",
-          placeholder: "请选择单元",
-          field: "unitId",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 5,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 8,
-          type: "button",
-          text: "查询",
-          col: 1,
-          click: "search",
-        },
-        // {
-        //   id: 7,
-        //   type: 'button',
-        //   text: '导出数据',
-        //   col: 2,
-        //   click: 'derive'
-        // }
-      ],
-      day1: 2,
-      dataValue: [12, 13, 10, 13, 9, 23, 21, 21, 24, 23, 14, 21, 21],
-      list: [],
-      allWaterList: [],
-      allWaterCount: null,
-      waterList: [],
-      waterCount: null,
-      waterRoom: "",
-      loading: true,
-    };
-  },
-  methods: {
-    init() {
-      getAllDayWater({}).then((res) => {
-        if (res.code === 10000) {
-          setTimeout(() => {
-            this.list = res.data;
-            this.loading = false;
-          }, 1000);
-        }
-      });
-    },
-    initAllWater() {
-      getListAllWater({}).then((res) => {
-        if (res.code === 10000) {
-          let that = this;
-          that.allWaterList = res.data.data;
-          that.allWaterCount = res.data.countWater;
-        }
-      });
-    },
-    initWater() {
-      getListWater({}).then((res) => {
-        if (res.code === 10000) {
-          this.waterList = res.data.data;
-          this.waterCount = res.data.countWater;
-          this.waterRoom = res.data.room;
-        }
-      });
-    },
-    getSchool() {
-      getSchool({}).then((res) => {
-        if (res.code === 10000) {
-          res.data.forEach((item) => {
-            item.value = item.id;
-            item.label = item.floorName;
-          });
-          this.selectItems[0].options = res.data;
-        }
-      });
-    },
-    setChange(item) {
-      if (item.type === "floorId") {
-        let params = {
-          floorId: item.data,
-        };
-        getByFloor(params).then((res) => {
-          res.data.forEach((item) => {
-            item.value = item.uid;
-            item.label = item.alias;
-          });
-          this.selectItems[1].options = res.data;
-        });
-      } else if (item.type === "uid") {
-        let params = {
-          uid: item.data,
-        };
-        getUid(params).then((res) => {
-          res.data.forEach((item) => {
-            item.value = item.id;
-            item.label = item.roomName;
-          });
-          this.selectItems[2].options = res.data;
-        });
-      }
-    },
-    setDay(data) {
-      this.day = data.type;
-      let params = {
-        endDate: timeDate(new Date().getTime()),
-        type: this.day,
-      };
-      getListAllWater(params).then((res) => {
-        if (res.code === 10000) {
-          let that = this;
-          that.allWaterList = res.data.data;
-          that.allWaterCount = res.data.countWater;
-        }
-      });
-    },
-    onClickType(data) {
-      let params = {};
-      if (data.data.value1.length > 0) {
-        params = {
-          startDate: data.data.value1[0],
-          endDate: data.data.value1[1],
-          type: 4,
-        };
-      } else {
-        params = {
-          endDate: timeDate(new Date().getTime()),
-          type: this.day,
-        };
-      }
-      getListAllWater(params).then((res) => {
-        if (res.code === 10000) {
-          let that = this;
-          that.allWaterList = res.data.data;
-          that.allWaterCount = res.data.countWater;
-        }
-      });
-    },
-    setDay1(data) {
-      this.day1 = data.type;
-      let data1 = data.data;
-      if (data1.unitId) {
-        let end = timeDate(new Date().getTime());
-        let params = {
-          roomId: data1.unitId,
-          endDate: end,
-          type: this.day1,
-        };
-        getListWater(params).then((res) => {
-          if (res.code === 10000) {
-            this.waterList = res.data.data;
-            this.waterCount = res.data.countWater;
-            this.waterRoom = res.data.room;
-          }
-        });
-      } else {
-        this.$message.error("请选择栋舍楼层单元查询");
-      }
-    },
-    onClickType1(data) {
-      if (data.type === "search") {
-        let data1 = data.data;
-        if (data1.unitId) {
-          let params;
-          if (data1.value1.length > 0) {
-            params = {
-              roomId: data1.unitId,
-              startDate: data1.value1[0],
-              endDate: data1.value1[1],
-              type: 4,
-            };
-          } else {
-            let end = timeDate(new Date().getTime());
-            params = {
-              roomId: data1.unitId,
-              endDate: end,
-              type: this.day1,
-            };
-          }
-          getListWater(params).then((res) => {
-            if (res.code === 10000) {
-              this.waterList = res.data.data;
-              this.waterCount = res.data.countWater;
-              this.waterRoom = res.data.room;
-            }
-          });
-        } else {
-          this.$message.error("请选择栋舍楼层单元查询");
-        }
-      }
-    },
-  },
-  mounted() {
-    this.initAllWater();
-    this.initWater();
-    this.init();
-    this.getSchool();
-  },
-};
-</script>
-
-<style scoped>
-.drinkWater {
-  width: 100%;
-  height: 100%;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-.echarts {
-  width: 100%;
-  height: 401px;
-  box-sizing: border-box;
-  border: 1px solid #ddd;
-  border-top: 0;
-  display: flex;
-}
-.echarts-l {
-  width: 30%;
-  height: 100%;
-}
-.echarts-r {
-  width: 70%;
-  height: 100%;
-}
-.carousel {
-  width: 100%;
-  height: 150px;
-  border-top: 1px solid #ddd;
-}
-.swiper {
-  width: 100%;
-  height: 100%;
-}
-.box {
-  width: 100%;
-  height: 100%;
-  border: 1px solid #ddd;
-  box-sizing: border-box;
-  padding: 30px 0;
-  text-align: center;
-  cursor: pointer;
-}
-.flex {
-  width: 100%;
-  height: 32px;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-.icon1 {
-  width: 32px;
-  height: 32px;
-  background: url("../../assets/images/u3077.svg") no-repeat;
-  display: inline-block;
-  background-size: 100% 100%;
-}
-</style>

+ 0 - 191
src/views/Env/Electro.vue

@@ -1,191 +0,0 @@
-<template>
-  <div class="electro">
-    <div class="reply" :style="{color: color}">全场用电情况</div>
-    <x-form :formItems="formItems" :day="day" @setDay="setDay" @onClickType="onClickType"></x-form>
-    <div class="echarts">
-      <div class="echarts-l">
-        <chart-electro></chart-electro>
-      </div>
-      <div class="echarts-r">
-        <chart-dl></chart-dl>
-      </div>
-    </div>
-    <br>
-    <div class="reply" :style="{color: color}">用电量详情</div>
-    <x-form :formItems="selectItems" :day="day1" @setDay="setDay1" @onClickType="onClickType1"></x-form>
-    <div class="echarts">
-      <div class="echarts-l">
-        <chart-electro :id="'1'"></chart-electro>
-      </div>
-      <div class="echarts-r">
-        <chart-dl :id="'1'"></chart-dl>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapState } from 'vuex';
-import XForm from "@/components/XForm";
-import ChartElectro from "@/views/Env/chart/ChartElectro";
-import ChartDl from "@/views/dashboard/chart/ChartDl";
-export default {
-  name: "Electro",
-  components: {
-    XForm,
-    ChartElectro,
-    ChartDl
-  },
-  data() {
-    return {
-      formItems: [
-        {
-          id: 1,
-          type: 'text',
-          text: '今日',
-          value: 1,
-          col: 1
-        },
-        {
-          id: 2,
-          type: 'text',
-          text: '本周',
-          value: 2,
-          col: 1
-        },
-        {
-          id: 3,
-          type: 'text',
-          text: '本月',
-          value: 3,
-          col: 1
-        },
-        {
-          id: 4,
-          type: 'datepicker',
-          placeholder: [],
-          field: 'value1',
-          col: 6
-        },
-        {
-          id: 5,
-          type: 'button',
-          text: '查询',
-          col: 2,
-          click: 'search'
-        }
-      ],
-      day: 2,
-      selectItems: [
-        {
-          id: 1,
-          type: 'select',
-          label: '栋舍:',
-          placeholder: '请选择栋舍',
-          field: 'areaId',
-          options: [],
-          col: 4
-        },
-        {
-          id: 2,
-          type: 'select',
-          label: '单元:',
-          placeholder: '请选择单元',
-          field: 'unitId',
-          options: [],
-          col: 4
-        },
-        {
-          id: 3,
-          type: 'text',
-          text: '今日',
-          value: 1,
-          col: 1
-        },
-        {
-          id: 4,
-          type: 'text',
-          text: '本周',
-          value: 2,
-          col: 1
-        },
-        {
-          id: 5,
-          type: 'text',
-          text: '本月',
-          value: 3,
-          col: 1
-        },
-        {
-          id: 6,
-          type: 'datepicker',
-          placeholder: [],
-          field: 'value1',
-          col: 6
-        },
-        {
-          id: 7,
-          type: 'button',
-          text: '查询',
-          col: 2,
-          click: 'search'
-        }
-      ],
-      day1: 2,
-      dataValue: [12, 13, 10, 13, 9, 23, 21, 21, 24, 23, 14, 21, 21]
-    };
-  },
-  computed: {
-    ...mapState(['color'])
-  },
-  methods: {
-    setDay(data) {
-      this.day = data;
-    },
-    onClickType() {
-
-    },
-    setDay1(data) {
-      this.day1 = data;
-    },
-    onClickType1() {},
-
-  }
-}
-</script>
-
-<style scoped>
-  .electro {
-    width: 100%;
-    height: 100%;
-    box-sizing: border-box;
-    padding: 20px 20px 0 20px;
-  }
-  .reply {
-    width: 100%;
-    border: 1px solid #ddd;
-    border-bottom: 0;
-    height: 50px;
-    background-color: #F3F3F3;
-    line-height: 50px;
-    font-size: 18px;
-    box-sizing: border-box;
-    padding-left: 20px;
-  }
-  .echarts {
-    width: 100%;
-    height: 401px;
-    box-sizing: border-box;
-    border: 1px solid #ddd;
-    border-top: 0;
-    display: flex;
-  }
-  .echarts-l {
-    width: 30%;
-    height: 100%;
-  }
-  .echarts-r {
-    width: 70%;
-    height: 100%;
-  }
-</style>

+ 0 - 372
src/views/Env/PigHouseEnv.vue

@@ -1,372 +0,0 @@
-<template>
-  <div class="pigHouse">
-    <el-skeleton
-      style="width: 100%; height: 200px;"
-      :loading="loading"
-      animated
-    >
-      <div style="height: 200px">
-        <swiper v-if="list.length > 0" class="swiper" :options="swiperOption">
-          <swiper-slide
-            v-for="(item, i) in list"
-            :key="i"
-            style="padding-top: 10px"
-          >
-            <div class="box">
-              <p>{{ item.room }}</p>
-              <div class="flex">
-                <div>
-                  <i class="icon1"></i>
-                </div>
-                <div>
-                  <span>{{
-                    item.temperature ? item.temperature + "℃" : "设备暂无数据"
-                  }}</span>
-                </div>
-              </div>
-              <div style="margin-top: 20px" class="flex">
-                <div>
-                  <i class="icon2"></i>
-                </div>
-                <div>
-                  <span>{{
-                    item.humidity ? item.humidity + "RH" : "设备暂无数据"
-                  }}</span>
-                </div>
-              </div>
-            </div>
-          </swiper-slide>
-          <div class="swiper-pagination" slot="pagination"></div>
-          <div class="swiper-button-prev" slot="button-prev"></div>
-          <div class="swiper-button-next" slot="button-next"></div>
-        </swiper>
-        <el-empty v-else description="暂无数据" style="height: 90%"></el-empty>
-      </div>
-    </el-skeleton>
-    <br />
-    <x-form
-      :formItems="formItems"
-      :day="day"
-      @setDay="setDay"
-      @setChange="setChange"
-      @onClickType="onClickType"
-    ></x-form>
-    <br />
-    <div style="height: 600px">
-      <chart-pig-temp
-        v-if="tempList.list.length > 0"
-        :tempList="tempList"
-      ></chart-pig-temp>
-      <el-empty v-else description="暂无数据"></el-empty>
-    </div>
-    <div style="height: 600px">
-      <chart-pig-hum
-        v-if="humList.list.length > 0"
-        :humList="humList"
-      ></chart-pig-hum>
-      <el-empty v-else description="暂无数据"></el-empty>
-    </div>
-  </div>
-</template>
-
-<script>
-import { swiper, swiperSlide } from "vue-awesome-swiper";
-import XForm from "@/components/XForm";
-import ChartPigTemp from "./chart/ChartPigTemp";
-import ChartPigHum from "./chart/ChartPigHum";
-import "swiper/css/swiper.css";
-import {
-  getEnv,
-  getSchool,
-  getByFloor,
-  getUid,
-  getByRoom,
-} from "../../utils/api";
-import { timeDate } from "../../utils";
-
-export default {
-  name: "PigHouseEnv",
-  components: {
-    swiper,
-    swiperSlide,
-    XForm,
-    ChartPigTemp,
-    ChartPigHum,
-  },
-  data() {
-    return {
-      swiperOption: {
-        slidesPerView: 8,
-        spaceBetween: 30,
-        autoplay: {
-          delay: 2500,
-          disableOnInteraction: false,
-        },
-        pagination: {
-          el: ".swiper-pagination",
-          type: "progressbar",
-        },
-        navigation: {
-          nextEl: ".swiper-button-next",
-          prevEl: ".swiper-button-prev",
-        },
-      },
-      list: [],
-      formItems: [
-        {
-          id: 1,
-          type: "select",
-          label: "栋舍:",
-          placeholder: "请选择栋舍",
-          field: "floorId",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 2,
-          type: "select",
-          label: "楼层:",
-          placeholder: "请选择楼层",
-          field: "uid",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 10,
-          type: "select",
-          label: "单元:",
-          placeholder: "请选择单元",
-          field: "unitId",
-          options: [],
-          col: 4,
-        },
-        {
-          id: 3,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "text",
-          text: "本周",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 5,
-          type: "text",
-          text: "本月",
-          value: 3,
-          col: 1,
-        },
-        {
-          id: 6,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 8,
-          type: "button",
-          text: "查询",
-          col: 1,
-          click: "search",
-        },
-        // {
-        //   id: 7,
-        //   type: 'button',
-        //   text: '导出数据',
-        //   col: 2,
-        //   click: 'derive'
-        // }
-      ],
-      // 默认选择本周
-      day: 2,
-      tempList: {
-        name: "",
-        list: [],
-      },
-      humList: {
-        name: "",
-        list: [],
-      },
-      loading: true,
-    };
-  },
-  methods: {
-    init() {
-      getEnv({}).then((res) => {
-        if (res.code === 10000) {
-          setTimeout(() => {
-            this.list = res.data;
-            this.loading = false;
-          }, 1000);
-        }
-      });
-    },
-    getSchool() {
-      getSchool({}).then((res) => {
-        if (res.code === 10000) {
-          res.data.forEach((item) => {
-            item.value = item.id;
-            item.label = item.floorName;
-          });
-          this.formItems[0].options = res.data;
-        }
-      });
-    },
-    setChange(item) {
-      if (item.type === "floorId") {
-        let params = {
-          floorId: item.data,
-        };
-        getByFloor(params).then((res) => {
-          res.data.forEach((item) => {
-            item.value = item.uid;
-            item.label = item.alias;
-          });
-          this.formItems[1].options = res.data;
-        });
-      } else if (item.type === "uid") {
-        let params = {
-          uid: item.data,
-        };
-        getUid(params).then((res) => {
-          res.data.forEach((item) => {
-            item.value = item.id;
-            item.label = item.roomName;
-          });
-          this.formItems[2].options = res.data;
-        });
-      }
-    },
-    setDay(data) {
-      this.day = data.type;
-      let data1 = data.data;
-      if (data1.unitId) {
-        let end = timeDate(new Date().getTime());
-        let params = {
-          roomId: data1.unitId,
-          endDate: end,
-          type: this.day,
-        };
-        getByRoom(params).then((res) => {
-          if (res.code === 10000) {
-            this.tempList = {
-              name: res.data.roomName,
-              list: res.data.semperatures,
-            };
-            this.humList = {
-              name: res.data.roomName,
-              list: res.data.humidities,
-            };
-          }
-        });
-      } else {
-        this.$message.error("请选择栋舍楼层单元查询");
-      }
-    },
-    onClickType(data) {
-      if (data.type === "search") {
-        let data1 = data.data;
-        if (data1.unitId) {
-          let params;
-          if (data1.value1.length > 0) {
-            params = {
-              roomId: data1.unitId,
-              startDate: data1.value1[0],
-              endDate: data1.value1[1],
-              type: 4,
-            };
-          } else {
-            let end = timeDate(new Date().getTime());
-            params = {
-              roomId: data1.unitId,
-              endDate: end,
-              type: this.day,
-            };
-          }
-          getByRoom(params).then((res) => {
-            if (res.code === 10000) {
-              this.tempList = {
-                name: res.data.roomName,
-                list: res.data.semperatures,
-              };
-              this.humList = {
-                name: res.data.roomName,
-                list: res.data.humidities,
-              };
-            }
-          });
-        } else {
-          this.$message.error("请选择栋舍楼层单元查询");
-        }
-      }
-    },
-    // 默认显示
-    getTempAndHum() {
-      getByRoom({}).then((res) => {
-        if (res.code === 10000) {
-          this.tempList = {
-            name: res.data.roomName,
-            list: res.data.semperatures,
-          };
-          this.humList = {
-            name: res.data.roomName,
-            list: res.data.humidities,
-          };
-        }
-      });
-    },
-  },
-  mounted() {
-    this.init();
-    this.getSchool();
-    this.getTempAndHum();
-  },
-};
-</script>
-
-<style scoped>
-.pigHouse {
-  width: 100%;
-  height: 100%;
-  padding: 20px 20px 0 20px;
-}
-.swiper {
-  width: 100%;
-  height: 100%;
-}
-.box {
-  width: 100%;
-  height: 100%;
-  border: 1px solid #ddd;
-  box-sizing: border-box;
-  padding: 30px 0;
-  text-align: center;
-  cursor: pointer;
-}
-.flex {
-  width: 100%;
-  height: 32px;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-.icon1 {
-  width: 32px;
-  height: 32px;
-  background: url("../../assets/images/u3028.svg") no-repeat;
-  display: inline-block;
-}
-.icon2 {
-  width: 32px;
-  height: 32px;
-  background: url("../../assets/images/u3029.svg") no-repeat;
-  background-size: 100% 100%;
-  display: inline-block;
-}
-</style>

+ 0 - 430
src/views/Env/SalePig.vue

@@ -1,430 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-12-07 10:07:56
- * @LastEditTime: 2022-01-04 13:19:38
- * @LastEditors: Please set LastEditors
- * @Description: 电子秤 - TODO: 卖猪计量的视频回放按钮
- * @FilePath: \hyyfClient\src\views\Env\SalePig.vue
--->
-<template>
-  <div class="sale-pig">
-    <div class="reply" :style="{ color: color }">
-      <div class="reset-title">
-        <span>卖猪重量计量</span>
-        <div class="reset-btns">
-          <span>视频监控:</span>
-          <el-button size="small" @click="handlePlay(1)">卖猪台点猪</el-button>
-          <el-button size="small" @click="handlePlay(2)">卖猪台猪舍</el-button>
-        </div>
-      </div>
-    </div>
-    <x-form
-      :formItems="formItems"
-      :day="day"
-      @setDay="setDay"
-      @onClickType="onClickType"
-    >
-    </x-form>
-    <div class="echarts">
-      <div class="echarts-l">
-        <chart-sale-pig :starkCount="elecAllCount"></chart-sale-pig>
-      </div>
-      <div class="echarts-r">
-        <!-- <chart-stark-bar :starkList="starkAllList"></chart-stark-bar> -->
-        <chart-elec-lines :data="elecData"></chart-elec-lines>
-      </div>
-    </div>
-    <br />
-    <div class="reply" :style="{ color: color }">重量详情</div>
-    <x-form
-      :formItems="formItemsTable"
-      :day="dayTable"
-      @setDay="setDayTable"
-      @onClickType="onClickTypeTable"
-    >
-    </x-form>
-    <table-content
-      :listData="elecDataList"
-      :tableItems="tableItems"
-      :shows="shows"
-    >
-    </table-content>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    >
-    </table-footer>
-    <el-dialog title="实时视频" :visible.sync="videoVisible" width="50%">
-      <div style="width: 100%; height: 560px">
-        <iframe
-          v-if="videoVisible"
-          :src="rtsp"
-          frameborder="0"
-          style="width: 100%; height: 530px;"
-        >
-        </iframe>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="videoVisible = false">关 闭</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import ChartSalePig from "./chart/ChartSalePig.vue";
-import ChartElecLines from "./chart/ChartElecLines.vue";
-import TableContent from "@/components/newTable/TableContent";
-import TableFooter from "@/components/TableFooter";
-
-import {
-  getDayWeight,
-  getDaysQuery,
-  getMonthQuery,
-  getQuery,
-} from "@/utils/chenApi.js";
-
-export default {
-  components: {
-    XForm,
-    ChartSalePig,
-    ChartElecLines,
-    TableContent,
-    TableFooter,
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      formItems: [
-        {
-          id: 2,
-          type: "text",
-          text: "近七次",
-          value: 1,
-          col: 1.5,
-        },
-        {
-          id: 3,
-          type: "text",
-          text: "本月",
-          value: 2,
-          col: 1,
-        },
-        {
-          id: 4,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 8,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      day: 1,
-      params: {},
-      // 卖猪详情的查询
-      formItemsTable: [
-        {
-          id: 2,
-          type: "text",
-          text: "今日",
-          value: 1,
-          col: 1.5,
-        },
-        {
-          id: 4,
-          type: "datepicker",
-          placeholder: [],
-          field: "value1",
-          col: 6,
-        },
-        {
-          id: 8,
-          type: "button",
-          text: "查询",
-          col: 2,
-          click: "search",
-        },
-      ],
-      dayTable: 1,
-      paramsTable: {},
-      elecAllCount: "0",
-      elecData: {
-        month: [],
-        elecList: [],
-      },
-      elecDataList: [],
-      tableItems: [
-        {
-          prop: "addTime",
-          label: "时间",
-          minWidth: "100",
-          slotName: "addTime",
-        },
-        {
-          prop: "grossWeight",
-          label: "毛重",
-          minWidth: "100",
-          slotName: "grossWeight",
-        },
-        {
-          prop: "tareWeight",
-          label: "去皮",
-          minWidth: "100",
-          slotName: "tareWeight",
-        },
-        {
-          prop: "netWeight",
-          label: "净重",
-          minWidth: "100",
-          slotName: "netWeight",
-        },
-      ],
-      shows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      total: 0,
-      pageNum: 1,
-      pageSize: 20,
-      videoVisible: false, // 视频回放
-      rtsp: "", // 视频回放的地址
-    };
-  },
-  mounted() {
-    this.initDayWeight();
-    this.initDaysQuery();
-  },
-  methods: {
-    setDay(data) {
-      this.day = data.type;
-      if (this.day === 1) {
-        this.initDaysQuery();
-      } else if (this.day === 2) {
-        this.initMonthQuery();
-      }
-    },
-    onClickType(data) {
-      this.day = 3; // 让 近七次 和 本月 不选中
-      this.params.time = data.data.value1;
-      if (!this.params.time) {
-        this.$message.info("请选择时间");
-        return;
-      }
-      this.initQuery();
-    },
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.pageNum = 1;
-      this.initDayWeight();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.initDayWeight();
-    },
-    // 重量详情
-    initDayWeight() {
-      this.pageNum = 1;
-      getDayWeight({
-        pageNo: this.pageNum,
-        pageSize: this.pageSize,
-        startDate: this.paramsTable.time ? this.paramsTable.time[0] : undefined,
-        endDate: this.paramsTable.time ? this.paramsTable.time[1] : undefined,
-        days: this.paramsTable.time ? undefined : 0,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.elecDataList = res.data.content;
-          this.elecDataList.forEach((item) => {
-            item.grossWeight += " kg";
-            item.tareWeight += " kg";
-            item.netWeight += " kg";
-          });
-          this.total = res.data.totalElements;
-        } else {
-          this.elecDataList = [];
-          this.total = 0;
-        }
-      });
-    },
-    // 近七次
-    initDaysQuery() {
-      getDaysQuery({
-        days: 7,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.elecAllCount = res.data.total;
-          const list = res.data.weight;
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-          list.forEach((item) => {
-            this.elecData.month.push(item.addTime.split("T")[0]);
-            this.elecData.elecList.push(item.netWeight);
-          });
-        } else {
-          this.elecAllCount = "0";
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-        }
-      });
-    },
-    // 本月
-    initMonthQuery() {
-      getMonthQuery({}).then((res) => {
-        if (res.code === 10000) {
-          this.elecAllCount = res.data.total;
-          const list = res.data.weight;
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-          list.forEach((item) => {
-            this.elecData.month.push(item.addTime.split("T")[0]);
-            this.elecData.elecList.push(item.netWeight);
-          });
-        } else {
-          this.elecAllCount = "0";
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-        }
-      });
-    },
-    // 指定日期
-    initQuery() {
-      getQuery({
-        startDate: this.params.time[0],
-        endDate: this.params.time[1],
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.elecAllCount = res.data.total;
-          const list = res.data.weight;
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-          list.forEach((item) => {
-            this.elecData.month.push(item.addTime.split("T")[0]);
-            this.elecData.elecList.push(item.netWeight);
-          });
-        } else {
-          this.elecAllCount = "0";
-          this.elecData = {
-            month: [],
-            elecList: [],
-          };
-        }
-      });
-    },
-    // 卖猪详情 - 今日
-    setDayTable() {
-      this.paramsTable = {};
-      this.initDayWeight();
-    },
-    onClickTypeTable(data) {
-      this.dayTable = 8; // 随便什么数字,反正今日不被选中
-      this.paramsTable.time = data.data.value1;
-      if (!this.paramsTable.time) {
-        this.$message.info("请选择时间");
-        return;
-      }
-      this.initDayWeight();
-    },
-    // 卖猪视频播放
-    handlePlay(val) {
-      if (val === 1) {
-        this.rtsp =
-          "static/jinm/index.html?" +
-          "1" +
-          "," +
-          "ws://36.26.62.70:9080/camera_relay?tcpaddr=admin%3Ahmkj6688%40172.16.3.193" +
-          "," +
-          "rtsp://admin:hmkj6688@172.16.3.193/cam/realmonitor?channel=1&subtype=0" +
-          "," +
-          "100%" +
-          "," +
-          "0";
-      } else {
-        this.rtsp =
-          "static/jinm/index.html?" +
-          "1" +
-          "," +
-          "ws://36.26.62.70:9080/camera_relay?tcpaddr=admin%3Ahmkj6688%40172.16.3.192" +
-          "," +
-          "rtsp://admin:hmkj6688@172.16.3.193/cam/realmonitor?channel=1&subtype=0" +
-          "," +
-          "100%" +
-          "," +
-          "0";
-      }
-      this.videoVisible = true;
-    },
-  },
-};
-</script>
-<style scoped>
-.sale-pig {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-/* 为了放视频按钮 */
-.reset-title {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  padding-right: 20px;
-}
-.reset-btns {
-  display: flex;
-  align-items: center;
-}
-.reset-btns > span {
-  color: #000;
-  margin-right: 3px;
-}
-.echarts {
-  width: 100%;
-  height: 401px;
-  box-sizing: border-box;
-  border: 1px solid #ddd;
-  border-top: 0;
-  display: flex;
-}
-.echarts-l {
-  width: 30%;
-  height: 100%;
-}
-.echarts-r {
-  width: 70%;
-  height: 100%;
-}
-</style>

+ 0 - 298
src/views/Env/Stark.vue

@@ -1,298 +0,0 @@
-<template>
-  <div class="electro">
-    <div class="reply" :style="{color: color}">全场用料情况</div>
-    <x-form :formItems="formItems" :day="day" @setDay="setDay" @onClickType="onClickType"></x-form>
-    <div class="echarts">
-      <div class="echarts-l">
-        <chart-stark :starkCount="starkAllCount"></chart-stark>
-      </div>
-      <div class="echarts-r">
-        <chart-stark-bar :starkList="starkAllList"></chart-stark-bar>
-      </div>
-    </div>
-    <br>
-    <div class="reply" :style="{color: color}">用料量详情</div>
-    <x-form :formItems="selectItems" :day="day1" @setDay="setDay1" @onClickType="onClickType1"></x-form>
-    <div class="echarts">
-      <div class="echarts-l">
-        <chart-stark :id="'1'" :starkCount="starkCount"></chart-stark>
-      </div>
-      <div class="echarts-r">
-        <chart-stark-bar-one :id="'1'" :starkList="starkList"></chart-stark-bar-one>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-import XForm from "@/components/XForm";
-import ChartStark from "./chart/ChartStark";
-import ChartStarkBar from "./chart/ChartStarkBar";
-import ChartStarkBarOne from "./chart/ChartStarkBarOne";
-import { getAllFodder, getFodder, getSchool } from "../../utils/api";
-import { timeDate } from "../../utils";
-
-export default {
-  name: "Stark",
-  components: {
-    XForm,
-    ChartStark,
-    ChartStarkBar,
-    ChartStarkBarOne
-  },
-  data() {
-    return {
-      formItems: [
-        {
-          id: 2,
-          type: 'text',
-          text: '本周',
-          value: 1,
-          col: 1
-        },
-        {
-          id: 3,
-          type: 'text',
-          text: '本月',
-          value: 2,
-          col: 1
-        },
-        {
-          id: 4,
-          type: 'datepicker',
-          placeholder: [],
-          field: 'value1',
-          col: 6
-        },
-        {
-          id: 8,
-          type: 'button',
-          text: '查询',
-          col: 2,
-          click: 'search'
-        },
-        // {
-        //   id: 5,
-        //   type: 'button',
-        //   text: '导出数据',
-        //   col: 2,
-        //   click: 'derive'
-        // },
-      ],
-      day: 1,
-      selectItems: [
-        {
-          id: 1,
-          type: 'select',
-          label: '栋舍:',
-          placeholder: '请选择栋舍',
-          field: 'floorId',
-          options: [],
-          col: 4
-        },
-        {
-          id: 4,
-          type: 'text',
-          text: '本周',
-          value: 1,
-          col: 1
-        },
-        {
-          id: 5,
-          type: 'text',
-          text: '本月',
-          value: 2,
-          col: 1
-        },
-        {
-          id: 6,
-          type: 'datepicker',
-          placeholder: [],
-          field: 'value1',
-          col: 6
-        },
-        {
-          id: 8,
-          type: 'button',
-          text: '查询',
-          col: 2,
-          click: 'search'
-        },
-        // {
-        //   id: 7,
-        //   type: 'button',
-        //   text: '导出数据',
-        //   col: 2,
-        //   click: 'derive'
-        // }
-      ],
-      day1: 1,
-      starkCount: 0,
-      starkAllCount: 0,
-      starkList: [],
-      starkAllList: [],
-    };
-  },
-  computed: {
-    ...mapState(['color'])
-  },
-  methods: {
-    // 获取全部用料
-    init() {
-      getAllFodder({}).then(res => {
-        if(res.code === 10000) {
-          this.starkAllCount = res.data.value;
-          this.starkAllList = res.data.fodderList;
-        }
-      })
-      getFodder({}).then(res => {
-        if(res.code === 10000) {
-          this.starkCount = res.data.value;
-          this.starkList = res.data.fodderList;
-        }
-      })
-    },
-    getSchool() {
-      getSchool({}).then(res => {
-        if(res.code === 10000) {
-          res.data.forEach(item => {
-            item.value = item.id;
-            item.label = item.floorName;
-          })
-          this.selectItems[0].options = res.data;
-        }
-      })
-    },
-    setDay(data) {
-      this.day = data.type;
-      let params = {
-        endDate: timeDate(new Date().getTime()),
-        type: this.day
-      }
-      getAllFodder(params).then(res => {
-        if(res.code === 10000) {
-          this.starkAllCount = res.data.value;
-          this.starkAllList = res.data.fodderList;
-        }
-      })
-    },
-    onClickType(data) {
-      if(data.type === 'search') {
-        let params = {};
-        if(data.data.value1.length > 0) {
-          params = {
-            startDate: data.data.value1[0],
-            endDate: data.data.value1[1],
-            type: 3
-          }
-        } else {
-          params = {
-            endDate: timeDate(new Date().getTime()),
-            type: this.day
-          }
-        }
-        getAllFodder(params).then(res => {
-          if(res.code === 10000) {
-            this.starkAllCount = res.data.value;
-            this.starkAllList = res.data.fodderList;
-          }
-        })
-      }
-    },
-    setDay1(data) {
-      this.day1 = data.type;
-      let data1 = data.data;
-      if (data1.floorId) {
-        let end = timeDate(new Date().getTime())
-        let params = {
-          floorId: data1.floorId,
-          endDate: end,
-          type: this.day1
-        }
-        getFodder(params).then(res => {
-          if(res.code === 10000) {
-            this.starkCount = res.data.value;
-            this.starkList = res.data.fodderList;
-          }
-        })
-      } else {
-        this.$message.error('请选择栋舍查询');
-      }
-    },
-    onClickType1(data) {
-      if(data.type === 'search') {
-        let data1 = data.data;
-        if (data1.floorId) {
-          let params;
-          if(data.data.value1.length > 0) {
-            params = {
-              floorId: data1.floorId,
-              startDate: data1.value1[0],
-              endDate: data1.value1[1],
-              type: 4,
-            }
-          } else {
-            let end = timeDate(new Date().getTime())
-            params = {
-              floorId: data1.floorId,
-              endDate: end,
-              type: this.day1
-            }
-          }
-          getFodder(params).then(res => {
-            if(res.code === 10000) {
-              this.starkCount = res.data.value;
-              console.log(this.starkCount);
-              this.starkList = res.data.fodderList;
-            }
-          })
-        } else {
-          this.$message.error('请选择栋舍查询');
-        }
-      }
-    },
-
-  },
-  mounted() {
-    this.getSchool()
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-.electro {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  border-bottom: 0;
-  height: 50px;
-  background-color: #F3F3F3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-.echarts {
-  width: 100%;
-  height: 401px;
-  box-sizing: border-box;
-  border: 1px solid #ddd;
-  border-top: 0;
-  display: flex;
-}
-.echarts-l {
-  width: 30%;
-  height: 100%;
-}
-.echarts-r {
-  width: 70%;
-  height: 100%;
-}
-</style>

+ 0 - 168
src/views/Env/chart/ChartElecLines.vue

@@ -1,168 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-08 17:24:29
- * @LastEditTime: 2022-01-04 13:21:13
- * @LastEditors: Please set LastEditors
- * @Description: 存栏结构 - 存栏变动折线图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ChartInventoryLines.vue
--->
-<template>
-  <div class="chart-inventory-lines">
-    <div id="chartElecLines"></div>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    data: {
-      type: Object,
-      required: true,
-      default: () => ({}),
-    },
-  },
-  methods: {
-    init() {
-      let flag = "";
-      if (this.data.month.length === 0) {
-        flag = "暂无数据";
-      }
-      let options = {
-        title: {
-          text: "重量统计",
-          x: 65,
-          y: 15,
-          subtext: flag,
-        },
-        tooltip: {
-          trigger: "axis",
-        },
-        // legend: {
-        //   data: ['头']
-        // },
-        color: ["#3aa0ff", "#4dcb73", "#fad337", "#f2637b", "#975fe4"],
-        grid: {
-          top: "20%",
-          left: "10%",
-          bottom: "10%",
-          right: "10%",
-        },
-        xAxis: [
-          {
-            type: "category",
-            // name: "月",
-            data: this.data.month,
-            axisPointer: {
-              type: "shadow",
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: true,
-            },
-          },
-        ],
-        //[
-        yAxis: {
-          type: "value",
-          name: "kg",
-          // axisLabel: {
-          //   formatter: '{value} °C'
-          // },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#6e7079",
-            },
-          },
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        },
-        // {
-        //   type: 'value',
-        //   name: '湿度',
-        //   axisLabel: {
-        //     formatter: '{value} RH'
-        //   },
-        //   axisLine: {
-        //     show: false,
-        //     lineStyle: {
-        //       color: '#6e7079',
-        //     }
-        //   },
-        //   axisTick:{
-        //     show:false
-        //   },
-        //   // splitLine:{
-        //   //   show:false
-        //   // }
-        // }
-        //],
-        series: [
-          {
-            name: "重量",
-            type: "line",
-            smooth: false,
-            data: this.data.elecList,
-            itemStyle: {
-              normal: {
-                color: "#3aa0ff",
-                lineStyle: {
-                  color: "#3aa0ff",
-                },
-              },
-            },
-          },
-          // {
-          //   name: '湿度',
-          //   type: 'line',
-          //   smooth: false,
-          //   yAxisIndex: 1,
-          //   data: [20, 22, 33, 45, 63, 102, 23, 24, 23, 65, 50, 62]
-          // }
-        ],
-      };
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chartElecLines")
-    );
-    this.init();
-  },
-  watch: {
-    data: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-
-<style scoped>
-.chart-inventory-lines {
-  /* display: inline-block; */
-  width: 100%;
-  height: 100%;
-}
-#chartElecLines {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 138
src/views/Env/chart/ChartElectro.vue

@@ -1,138 +0,0 @@
-<template>
-  <div :id="'chart-electro-pie-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-
-export default {
-  name: "ChartElectro",
-  computed: {
-    ...mapState(["color"]),
-  },
-  props: {
-    id: {
-      type: String,
-      default: () => "0",
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-  },
-  methods: {
-    init() {
-      let data = [{ name: "总重量", value: "123.1" }];
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ",");
-      };
-      let total = data.reduce((a, b) => {
-        return a + b.value * 1;
-      }, 0);
-      let options = {
-        color: [this.color],
-        title: [
-          {
-            text:
-              "{name|" +
-              "总重量" +
-              "}\n{val|" +
-              formatNumber(total) +
-              "度" +
-              "}",
-            top: "center",
-            left: "center",
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: "normal",
-                  color: "#666666",
-                  padding: [10, 0],
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: "bold",
-                  color: "#333333",
-                },
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            type: "pie",
-            radius: ["45%", "60%"],
-            center: ["50%", "50%"],
-            data: data,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: "#fff",
-                borderWidth: 2,
-              },
-            },
-            labelLine: {
-              normal: {
-                length: 20,
-                length2: 120,
-                lineStyle: {
-                  color: "#e6e6e6",
-                },
-              },
-            },
-            label: {
-              normal: {
-                formatter: (params) => {
-                  return (
-                    "{icon|●}{name|" +
-                    params.name +
-                    "}{value|" +
-                    formatNumber(params.value) +
-                    "}"
-                  );
-                },
-                padding: [0, -100, 25, -100],
-                rich: {
-                  icon: {
-                    fontSize: 16,
-                  },
-                  name: {
-                    fontSize: 14,
-                    padding: [0, 10, 0, 4],
-                    color: "#666666",
-                  },
-                  value: {
-                    fontSize: 18,
-                    fontWeight: "bold",
-                    color: "#333333",
-                  },
-                },
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-electro-pie-" + this.id)
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 145
src/views/Env/chart/ChartPigHum.vue

@@ -1,145 +0,0 @@
-<template>
-  <div id="chartPigHum" style="width:100%; height: 100%;"></div>
-</template>
-
-<script>
-import { mapState } from 'vuex'
-export default {
-  name: "ChartPigHum",
-  computed: {
-    ...mapState(['color'])
-  },
-  data() {
-    return {
-      myChart: null
-    }
-  },
-  props: {
-    humList: {
-      type: Object,
-      default: function () {
-        return {
-          name: '',
-          list: [],
-        }
-      }
-    }
-  },
-  watch: {
-    color(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    },
-    humList: {
-      handler(newVal) {
-        if(newVal) {
-          this.myChart.clear();
-          this.init()
-        }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    init() {
-      let start = this.humList.list.length - 12;
-      let end = this.humList.list.length - 1;
-      let time = [];
-      let data = [];
-      let name = this.humList.name;
-      this.humList.list.forEach(item => {
-        time.push(item.createTime)
-        data.push(item.value)
-      })
-      let options = {
-        title: {
-          text: `${name}湿度曲线`,
-          left: 'center'
-        },
-        tooltip: {
-          trigger: 'axis',
-        },
-        color: [this.color],
-        dataZoom: [{
-          type: 'inside',
-          startValue: start,
-          endValue: end,
-          show: false
-        }],
-        xAxis: [
-          {
-            type: 'category',
-            data: time,
-            axisPointer: {
-              type: 'shadow'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: '湿度统计情况',
-            axisLabel: {
-              formatter: '{value}RH'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        series: [
-          {
-            name: `${name}`,
-            type: 'line',
-            // stack: 'Total',
-            smooth: true,
-            areaStyle: {},
-            emphasis: {
-              focus: 'series'
-            },
-            itemStyle : {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label : {
-                  show: true,
-                  textStyle: {
-                    fontSize: 14
-                  }
-                }
-              }
-            },
-            data: data
-          }
-        ]
-      }
-      this.myChart.setOption(options)
-    }
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chartPigHum'));
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 145
src/views/Env/chart/ChartPigTemp.vue

@@ -1,145 +0,0 @@
-<template>
-  <div id="chart-pig" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from 'vuex'
-export default {
-  name: "ChartPigTemp",
-  computed: {
-    ...mapState(['color'])
-  },
-  data() {
-    return {
-      myChart: null
-    }
-  },
-  props: {
-    tempList: {
-      type: Object,
-      default: function () {
-        return {
-          name: '',
-          list: [],
-        }
-      }
-    }
-  },
-  watch: {
-    color(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    },
-    tempList: {
-      handler(newVal) {
-        if(newVal) {
-          this.myChart.clear();
-          this.init()
-        }
-      },
-      deep: true
-    }
-  },
-  methods: {
-    init() {
-      let start = this.tempList.list.length - 12;
-      let end = this.tempList.list.length - 1;
-      let time = [];
-      let data = [];
-      let name = this.tempList.name;
-      this.tempList.list.forEach(item => {
-        time.push(item.createTime)
-        data.push(item.value)
-      })
-      let options = {
-        title: {
-          text: `${name}温度曲线`,
-          left: 'center'
-        },
-        tooltip: {
-          trigger: 'axis',
-        },
-        color: [this.color],
-        dataZoom: [{
-          type: 'inside',
-          startValue: start,
-          endValue: end,
-          show: false
-        }],
-        xAxis: [
-          {
-            type: 'category',
-            data: time,
-            axisPointer: {
-              type: 'shadow'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: '温度统计情况',
-            axisLabel: {
-              formatter: '{value}℃'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        series: [
-          {
-            name: `${name}`,
-            type: 'line',
-            // stack: 'Total',
-            smooth: true,
-            areaStyle: {},
-            emphasis: {
-              focus: 'series'
-            },
-            itemStyle : {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label : {
-                  show: true,
-                  textStyle: {
-                    fontSize: 14
-                  }
-                }
-              }
-            },
-            data: data
-          }
-        ]
-      }
-      this.myChart.setOption(options)
-    }
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chart-pig'));
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 148
src/views/Env/chart/ChartSalePig.vue

@@ -1,148 +0,0 @@
-<template>
-  <div :id="'chart-sale-pie-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-export default {
-  name: "ChartStark",
-  computed: {
-    ...mapState(["color"]),
-  },
-  props: {
-    id: {
-      type: String,
-      default: () => "0",
-    },
-    starkCount: {
-      type: String,
-      default: () => "0",
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    starkCount(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-  },
-  methods: {
-    init() {
-      let data = [{ name: "总重量", value: this.starkCount.toString() }];
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ",");
-      };
-      let total = data.reduce((a, b) => {
-        return a + b.value * 1;
-      }, 0);
-      let options = {
-        color: [this.color],
-        title: [
-          {
-            text:
-              "{name|" +
-              "总重量" +
-              "}\n{val|" +
-              formatNumber(total) +
-              "千克" +
-              "}",
-            top: "center",
-            left: "center",
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: "normal",
-                  color: "#666666",
-                  padding: [10, 0],
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: "bold",
-                  color: "#333333",
-                },
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            type: "pie",
-            radius: ["45%", "60%"],
-            center: ["50%", "50%"],
-            data: data,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: "#fff",
-                borderWidth: 2,
-              },
-            },
-            labelLine: {
-              normal: {
-                length: 20,
-                length2: 120,
-                lineStyle: {
-                  color: "#e6e6e6",
-                },
-              },
-            },
-            label: {
-              // normal: {
-              //   formatter: (params) => {
-              //     return (
-              //       "{icon|●}{name|" +
-              //       params.name +
-              //       "}{value|" +
-              //       formatNumber(params.value) +
-              //       "}"
-              //     );
-              //   },
-              //   padding: [0, -100, 25, -100],
-              //   rich: {
-              //     icon: {
-              //       fontSize: 16,
-              //     },
-              //     name: {
-              //       fontSize: 14,
-              //       padding: [0, 10, 0, 4],
-              //       color: "#666666",
-              //     },
-              //     value: {
-              //       fontSize: 18,
-              //       fontWeight: "bold",
-              //       color: "#333333",
-              //     },
-              //   },
-              // },
-              show: false,
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-sale-pie-" + this.id)
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 155
src/views/Env/chart/ChartStark.vue

@@ -1,155 +0,0 @@
-<template>
-  <div :id="'chart-stark-pie-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-export default {
-  name: "ChartStark",
-  computed: {
-    ...mapState(["color"]),
-  },
-  props: {
-    id: {
-      type: String,
-      default: () => "0",
-    },
-    starkCount: {
-      type: Number,
-      default: () => 0,
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  watch: {
-    color(newVal) {
-      if (newVal) {
-        this.myChart.clear();
-        this.init();
-      }
-    },
-    starkCount: {
-      handler() {
-        this.myChart.clear();
-        this.init();
-      },
-      deep: true,
-    }
-    // starkCount(newVal) {
-    //   if (newVal) {
-    //     console.log(newVal)
-    //     this.myChart.clear();
-    //     this.init();
-    //   }
-    // },
-  },
-  methods: {
-    init() {
-      let data = [{ name: "总用料量", value: this.starkCount.toString() }];
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ",");
-      };
-      let total = data.reduce((a, b) => {
-        return a + b.value * 1;
-      }, 0);
-      let options = {
-        color: [this.color],
-        title: [
-          {
-            text:
-              "{name|" +
-              "总用料量" +
-              "}\n{val|" +
-              formatNumber(total) +
-              "Kg" +
-              "}",
-            top: "center",
-            left: "center",
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: "normal",
-                  color: "#666666",
-                  padding: [10, 0],
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: "bold",
-                  color: "#333333",
-                },
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            type: "pie",
-            radius: ["45%", "60%"],
-            center: ["50%", "50%"],
-            data: data,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: "#fff",
-                borderWidth: 2,
-              },
-            },
-            labelLine: {
-              normal: {
-                length: 20,
-                length2: 120,
-                lineStyle: {
-                  color: "#e6e6e6",
-                },
-              },
-            },
-            label: {
-              normal: {
-                formatter: (params) => {
-                  return (
-                    "{icon|●}{name|" +
-                    params.name +
-                    "}{value|" +
-                    formatNumber(params.value) +
-                    "}"
-                  );
-                },
-                padding: [0, -100, 25, -100],
-                rich: {
-                  icon: {
-                    fontSize: 16,
-                  },
-                  name: {
-                    fontSize: 14,
-                    padding: [0, 10, 0, 4],
-                    color: "#666666",
-                  },
-                  value: {
-                    fontSize: 18,
-                    fontWeight: "bold",
-                    color: "#333333",
-                  },
-                },
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(options);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-stark-pie-" + this.id)
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 169
src/views/Env/chart/ChartStarkBar.vue

@@ -1,169 +0,0 @@
-<template>
-  <div :id="'chart-stark-bar-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-export default {
-  name: "ChartStarkBar",
-  props: {
-    id: {
-      type: String,
-      default: () => "0",
-    },
-    starkList: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  watch: {
-    starkList: {
-      handler(newVal) {
-        if (newVal) {
-          this.myChart.clear();
-          this.init();
-        }
-      },
-      deep: true,
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  methods: {
-    init() {
-      var time = [];
-      var data1 = [];
-      var data2 = [];
-      var data3 = [];
-      this.starkList.forEach((item) => {
-        time.push(item.screateTime);
-        data1.push(item.onevalue);
-        data2.push(item.twovalue);
-        data3.push(item.threevalue);
-      });
-      let start = time.length - 8;
-      let end = time.length - 1;
-      var option = {
-        legend: {
-          data: ["1号楼", "2号楼", "3号楼"],
-        },
-        color: ["#73C0DE", "#9A60B4", "#5470C6", "#91CB74"],
-        tooltip: {
-          trigger: "axis",
-        },
-        dataZoom: [
-          {
-            type: "inside",
-            startValue: start,
-            endValue: end,
-            show: false,
-          },
-        ],
-        xAxis: [
-          {
-            type: "category",
-            data: time,
-            axisPointer: {
-              type: "shadow",
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        yAxis: [
-          {
-            type: "value",
-            name: "用料统计情况",
-            axisLabel: {
-              formatter: "{value} 吨",
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        series: [
-          {
-            name: "1号楼",
-            data: data1,
-            type: "bar",
-            itemStyle: {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label: {
-                  show: true,
-                  position: "top",
-                  textStyle: {
-                    fontSize: 14,
-                  },
-                },
-              },
-            },
-          },
-          {
-            name: "2号楼",
-            data: data2,
-            type: "bar",
-            itemStyle: {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label: {
-                  show: true,
-                  position: "top",
-                  textStyle: {
-                    fontSize: 14,
-                  },
-                },
-              },
-            },
-          },
-          {
-            name: "3号楼",
-            data: data3,
-            type: "bar",
-            itemStyle: {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label: {
-                  show: true,
-                  position: "top",
-                  textStyle: {
-                    fontSize: 14,
-                  },
-                },
-              },
-            },
-          },
-        ],
-      };
-      this.myChart.setOption(option);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(
-      document.getElementById("chart-stark-bar-" + this.id)
-    );
-    this.init();
-  },
-};
-</script>
-
-<style scoped></style>

+ 0 - 136
src/views/Env/chart/ChartStarkBarOne.vue

@@ -1,136 +0,0 @@
-<template>
-  <div :id="'chart-one-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from "vuex";
-
-export default {
-  name: "ChartStarkBarOne",
-  props: {
-    id: {
-      type: String,
-      default: () => '0'
-    },
-    starkList: {
-      type: Array,
-      default: () => []
-    }
-  },
-  watch: {
-    starkList: {
-      handler(newVal) {
-        if(newVal) {
-          this.myChart.clear();
-          this.init()
-        }
-      },
-      deep: true
-    },
-    color(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    }
-  },
-  computed: {
-    ...mapState(['color'])
-  },
-  data() {
-    return {
-      myChart: null
-    }
-  },
-  methods: {
-    init() {
-      var time = [];
-      var data1 = [];
-      this.starkList.forEach(item => {
-        time.push(item.createTime);
-        data1.push(item.value)
-      })
-      let start = time.length - 8;
-      let end = time.length - 1;
-      var option = {
-        tooltip: {
-          trigger: 'axis',
-        },
-        dataZoom: [{
-          type: 'inside',
-          startValue: start,
-          endValue: end,
-          show: false
-        }],
-        color: [this.color],
-        xAxis: [
-          {
-            type: 'category',
-            data: time,
-            axisPointer: {
-              type: 'shadow'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: '用料统计情况',
-            axisLabel: {
-              formatter: '{value} 吨'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        series: [
-          {
-            name: '用料情况',
-            data: data1,
-            type: 'bar',
-            barWidth : 50,
-            itemStyle : {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label : {
-                  show: true,
-                  position: 'top',
-                  textStyle: {
-                    fontSize: 14
-                  }
-                }
-              }
-            },
-          },
-        ]
-      };
-      this.myChart.setOption(option)
-    }
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chart-one-' + this.id));
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 138
src/views/Env/chart/ChartWaterPie.vue

@@ -1,138 +0,0 @@
-<template>
-  <div :id="'chart-water-pie-' + id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from 'vuex'
-export default {
-  name: "ChartWaterPie",
-  computed: {
-    ...mapState(['color'])
-  },
-  props: {
-    id: {
-      type: String,
-      default: () => '0'
-    },
-    waterCount: {
-      type: String,
-      default: () => '0'
-    }
-  },
-  data() {
-    return {
-      myChart: null
-    }
-  },
-  watch: {
-    color(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    },
-    waterCount(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    }
-  },
-  methods: {
-    init() {
-      let data = [{name: '总饮水量', value: this.waterCount.toString()}]
-      let formatNumber = function(num) {
-        let reg = /(?=(\B)(\d{3})+$)/g;
-        return num.toString().replace(reg, ',');
-      }
-      let total = data.reduce((a, b) => {
-        return a + b.value * 1
-      }, 0);
-      let options = {
-        color: [this.color],
-        title: [
-          {
-            text: '{name|' + '饮用水总量' + '}\n{val|' + formatNumber(total) + '吨' +'}',
-            top: 'center',
-            left: 'center',
-            textStyle: {
-              rich: {
-                name: {
-                  fontSize: 14,
-                  fontWeight: 'normal',
-                  color: '#666666',
-                  padding: [10, 0],
-                },
-                val: {
-                  fontSize: 32,
-                  fontWeight: 'bold',
-                  color: '#333333',
-                },
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            type: 'pie',
-            radius: ['45%', '60%'],
-            center: ['50%', '50%'],
-            data: data,
-            hoverAnimation: false,
-            itemStyle: {
-              normal: {
-                borderColor: '#fff',
-                borderWidth: 2
-              }
-            },
-            labelLine: {
-              normal: {
-                length: 20,
-                length2: 120,
-                lineStyle: {
-                  color: '#e6e6e6'
-                }
-              }
-            },
-            label: {
-              normal: {
-                formatter: params => {
-                  return (
-                      '{icon|●}{name|' + params.name + '}{value|' +
-                      formatNumber(params.value) + '}'
-                  );
-                },
-                padding: [0 , -100, 25, -100],
-                rich: {
-                  icon: {
-                    fontSize: 16
-                  },
-                  name: {
-                    fontSize: 14,
-                    padding: [0, 10, 0, 4],
-                    color: '#666666'
-                  },
-                  value: {
-                    fontSize: 18,
-                    fontWeight: 'bold',
-                    color: '#333333'
-                  }
-                }
-              }
-            },
-          }
-        ]
-      }
-      this.myChart.setOption(options)
-    }
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chart-water-pie-' + this.id));
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 925
src/views/PdcData/Analysis.vue

@@ -1,925 +0,0 @@
-<template>
-  <div class="analysis">
-    <!-- 工作看板 -->
-    <board :title="title[0]">
-      <div>
-        <work-infos :dataList="workInfos" @workInfoClick="handleWorkInfoClick">
-        </work-infos>
-        <div class="table-content">
-          <table-content
-            :tableItems="tableItems"
-            :height="height"
-            :shows="tableShows"
-            :listData="tableData"
-          >
-            <!-- <template v-slot:handleState="slotProps">
-              {{ slotProps.row.handleState ? "已处理" : "未处理" }}
-            </template> -->
-          </table-content>
-        </div>
-      </div>
-    </board>
-
-    <!-- 存栏情况 -->
-    <board :title="title[1]">
-      <div>
-        <div>
-          <!-- 存栏结构 -->
-          <chart-inventory-pie :data="inventoryPieData"></chart-inventory-pie>
-          <!-- 存栏变动 -->
-          <chart-inventory-lines :data="inventoryLinesData">
-          </chart-inventory-lines>
-        </div>
-        <div>
-          <!-- 存栏计数 -->
-          <inventory-items :data="inventoryItemsData"></inventory-items>
-        </div>
-      </div>
-    </board>
-
-    <!-- 生产情况 -->
-    <board :title="title[2]">
-      <!-- 环形图 -->
-      <production-donuts :data="productionPercents"> </production-donuts>
-      <!-- 8个格子 -->
-      <production-items :data="productionItems"></production-items>
-    </board>
-
-    <!-- 经营分析 -->
-    <board :title="title[3]">
-      <!-- 成本分析 -->
-      <div class="cost">
-        <div class="cost-content">
-          <div class="cost-left">
-            <cost-pie :data="costPieData" :title="costTitles[costIndex]">
-            </cost-pie>
-          </div>
-          <div class="cost-right">
-            <cost-histogram
-              :data="costHisData"
-              :xAxisData="costTitles"
-              @changeCostIndex="changeCostIndex"
-            >
-            </cost-histogram>
-          </div>
-        </div>
-        <h3 class="label">成本分析</h3>
-      </div>
-
-      <!-- 重要指标 -->
-      <div class="important">
-        <div class="condition">
-          <el-select
-            size="small"
-            v-model="importantValue"
-            style="margin-right: 20px"
-            @change="changeImportantValue"
-          >
-            <el-option
-              v-for="item in importantOptions"
-              :key="item.type"
-              :label="item.label"
-              :value="item.type"
-            >
-            </el-option>
-          </el-select>
-          <el-date-picker
-            v-model="importantDates"
-            size="small"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            value-format="yyyy-MM-dd"
-            @change="changeImportantDates"
-          >
-          </el-date-picker>
-        </div>
-        <div class="important-chart">
-          <important-line :listData="importantData" v-bind="importantTitle">
-          </important-line>
-        </div>
-      </div>
-
-      <!-- 销售情况 -->
-      <div class="sales">
-        <div class="sales-title">销售</div>
-        <div class="sales-condition">
-          <el-date-picker
-            v-model="getSalesDates"
-            type="daterange"
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            align="right"
-            size="small"
-            value-format="yyyy-MM-dd"
-          >
-          </el-date-picker>
-        </div>
-        <div class="sales-content">
-          <div class="sales-left">
-            <div class="up">
-              <label>本月累计销售额</label>
-              <span>{{ monthSales }}元</span>
-            </div>
-            <div class="up">
-              <label>本月累计销售量</label>
-              <span>{{ monthAmount }}头</span>
-            </div>
-            <div class="up">
-              <label>上月销售额</label>
-              <span>{{ weekSales }}元</span>
-              <div class="sales-change">
-                <div>
-                  <div
-                    class="triangle-change"
-                    :class="
-                      weekSalesChange > 0 ? 'triangle-up' : 'triangle-down'
-                    "
-                  ></div>
-                  <span :class="weekSalesChange > 0 ? 'color-up' : 'color-down'"
-                    >{{ weekSalesChange }}%</span
-                  >
-                  &nbsp;&nbsp;&nbsp;环比上月
-                </div>
-              </div>
-            </div>
-            <div class="down">
-              <label>上月销售量</label>
-              <span>{{ weekSalesVolume }}头</span>
-              <div class="sales-change">
-                <div>
-                  <div
-                    class="triangle-change"
-                    :class="
-                      weekSalesVolumeChange > 0
-                        ? 'triangle-up'
-                        : 'triangle-down'
-                    "
-                  ></div>
-                  <span
-                    :class="
-                      weekSalesVolumeChange > 0 ? 'color-up' : 'color-down'
-                    "
-                  >
-                    {{ weekSalesVolumeChange }}%
-                  </span>
-                  &nbsp;&nbsp;&nbsp;环比上月
-                </div>
-              </div>
-            </div>
-          </div>
-          <div class="sales-right">
-            <sales-chart :data="salesChartData"></sales-chart>
-          </div>
-        </div>
-      </div>
-    </board>
-
-    <!-- 应收排名 -->
-    <!-- <board :title="title[4]">
-      <table-content
-        :tableItems="yingshouTableItems"
-        :height="height"
-        :shows="yingshouTableShows"
-        :listData="yingshouTableData"
-      >
-      </table-content>
-    </board> -->
-
-    <!-- 应付排名 -->
-    <board :title="title[5]">
-      <table-content
-        :tableItems="yingshouTableItems"
-        :height="height"
-        :shows="yingshouTableShows"
-        :listData="yingfuTableData"
-      >
-      </table-content>
-    </board>
-
-    <!-- 安全库存报警 -->
-    <board :title="title[6]">
-      <table-content
-        :tableItems="safetyTableItems"
-        :height="height"
-        :shows="safetyTableShows"
-        :listData="safetyTableData"
-        :empty-text="'暂无报警'"
-      >
-        <template #isWarning="slotProps">
-          <el-tag
-            :type="slotProps.row.isWarning ? 'success' : 'warning'"
-            effect="dark"
-          >
-            {{ slotProps.row.isWarning ? "已报警" : "未报警" }}
-          </el-tag>
-        </template>
-      </table-content>
-      <table-footer
-        :totals="total"
-        :size="size"
-        @sizeChange="sizeChange"
-        @pageChange="pageChange"
-      >
-      </table-footer>
-    </board>
-  </div>
-</template>
-
-<script>
-import Board from "components/board/index.vue";
-import WorkInfos from "./analysis/WorkInfos.vue";
-import TableContent from "components/newTable/TableContent.vue";
-import ChartInventoryPie from "./analysis/ChartInventoryPie.vue";
-import ChartInventoryLines from "./analysis/ChartInventoryLines.vue";
-import InventoryItems from "./analysis/InventoryItems.vue";
-import ProductionDonuts from "./analysis/ProductionDonuts.vue";
-import ProductionItems from "./analysis/ProductionItems.vue";
-import CostPie from "./analysis/CostPie.vue";
-import CostHistogram from "./analysis/CostHistogram.vue";
-import ImportantLine from "./analysis/ImportantLine.vue";
-import SalesChart from "./analysis/SalesChart.vue";
-import TableFooter from "../../components/TableFooter";
-
-import { tableItems, tableShows } from "./analysis/table.config";
-import {
-  yingshouTableItems,
-  yingshouTableShows,
-} from "./analysis/yingshouTable.config";
-import {
-  safetyTableItems,
-  safetyTableShows,
-} from "./analysis/safetyTable.config";
-// import { formItems } from './analysis/salesXForm.config'
-
-import {
-  getInventoryLines,
-  getInventoryAndProduct,
-  // getSalesChange,
-  // getSalesChart,
-  // getCosts,
-  // getYingShou,
-  getYingFu,
-} from "utils/api";
-import {
-  getWorkTotal,
-  getWorkInfos,
-  getSafeInventory,
-  getProductionCondition,
-  getImportantData,
-  getCostData,
-  getTheSales,
-} from "utils/chenApi";
-
-export default {
-  name: "Analysis",
-  components: {
-    Board,
-    WorkInfos,
-    TableContent,
-    ChartInventoryPie,
-    ChartInventoryLines,
-    InventoryItems,
-    ProductionDonuts,
-    ProductionItems,
-    CostPie,
-    CostHistogram,
-    ImportantLine,
-    // XForm,
-    SalesChart,
-    TableFooter,
-  },
-  data() {
-    return {
-      title: [
-        "工作看板",
-        "存栏情况",
-        "生产情况",
-        "经营分析",
-        "应收排名",
-        "应付排名",
-        "安全库存报警",
-      ],
-      workInfos: [],
-      tableItems: [],
-      tableShows: {},
-      height: 300,
-      tableData: [],
-      // 存栏情况
-      inventoryLinesData: {
-        month: [],
-      }, // 折线图数据
-      inventoryPieData: [
-        {
-          stockQuantity: 0,
-        },
-        {
-          stockQuantity: 0,
-        },
-        {
-          stockQuantity: 0,
-        },
-        {
-          stockQuantity: 0,
-        },
-        {
-          stockQuantity: 0,
-        },
-      ], // 环形图数据
-      inventoryItemsData: [], // 下面块图的数据
-      // 生产情况
-      productionPercents: [], // 百分比
-      productionItems: [], // 下面块图的数据
-      // 经营分析
-      costTitles: ["总成本", "基础猪群", "保育猪群", "育肥猪群", "后备猪群"], // 成本分析 - 被选中的名字
-      costIndex: 0, // 成本分析 - 名字数组的 index
-      costPieData: {}, // 经营分析 - 成本分析环形图
-      costHisData: [], // 经营分析 - 柱状图
-      // 重要指标
-      importantOptions: [
-        {
-          type: 1,
-          label: "配种指标",
-        },
-        {
-          type: 2,
-          label: "分娩指标",
-        },
-        {
-          type: 3,
-          label: "断奶指标",
-        },
-        {
-          type: 4,
-          label: "成活率指标",
-        },
-      ],
-      importantValue: 1,
-      importantDates: [],
-      importantData: [], // 重要指标折线图数据
-      importantTitle: {}, // 重要指标的名称
-      // 销售额
-      // salesFormItems: [],
-      salesDay: 2, //默认选择本周
-      weekSales: 1545252,
-      weekSalesChange: 10,
-      weekSalesVolume: 1000,
-      weekSalesVolumeChange: -10,
-      monthSales: 0,
-      monthAmount: 0,
-      getSalesDates: [], // 销售图的时间选择
-      pickerOptions: {
-        // 快捷选项
-        shortcuts: [
-          {
-            text: "最近一周",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近一个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-          {
-            text: "最近三个月",
-            onClick(picker) {
-              const end = new Date();
-              const start = new Date();
-              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
-              picker.$emit("pick", [start, end]);
-            },
-          },
-        ],
-      },
-      salesChartData: {
-        timeList: [],
-      }, // 销售图的数据
-      // 应收排名
-      yingshouTableItems: [],
-      yingshouTableShows: {},
-      yingshouTableData: [],
-      // 应付排名
-      yingfuTableData: [],
-      // 安全库存报警
-      safetyTableItems: [],
-      safetyTableShows: {},
-      safetyTableData: [],
-      total: 0,
-      size: 20,
-      pageNum: 1,
-    };
-  },
-  mounted() {
-    // this.salesFormItems = formItems
-    this.tableItems = tableItems;
-    this.tableShows = tableShows;
-    this.yingshouTableItems = yingshouTableItems;
-    this.yingshouTableShows = yingshouTableShows;
-    this.safetyTableItems = safetyTableItems;
-    this.safetyTableShows = safetyTableShows;
-    /** 获取网络请求数据 */
-    this.initInventoryLines();
-    this.initInventoryAndProduct();
-    // this.initSalesChange();
-    // this.initSalesChart();
-    // this.initYingShou();
-    this.initYingFu();
-    this.initWorkBoard(); // 工作看板
-    this.initSafeInventory(); // 安全库存报警
-    this.initProductionCondition(); // 生产情况
-    this.initImportantData(); // 重要指标
-    this.initCostData(); // 成本分析
-    this.initTheSales(); // 销售情况
-  },
-  methods: {
-    handleWorkInfoClick() {
-      // console.log(item);
-    },
-    // 修改size
-    sizeChange(val) {
-      this.size = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    // 销售额选中日期
-    salesSetDay(data) {
-      this.salesDay = data;
-    },
-    // // 销售额选中日周月
-    // salesOnClickType(data) {
-    //   // console.log(data);
-    // },
-    // 工作看板
-    initWorkBoard() {
-      getWorkTotal({}).then(async (res) => {
-        this.workInfos = [
-          {
-            label: "报警信息",
-            number: res.data.warning?.planTimes || 0,
-          },
-          {
-            label: "日常计划",
-            number: res.data.daily?.planTimes || 0,
-          },
-          {
-            label: "转舍记录",
-            number: res.data.transferHouse?.planTimes || 0,
-          },
-          {
-            label: "普免计划",
-            number: res.data.ordinary?.planTimes || 0,
-          },
-          {
-            label: "免疫计划",
-            number: res.data.immune?.planTimes || 0,
-          },
-        ];
-        const result = await getWorkInfos({});
-        this.tableData = result.data;
-      });
-    },
-    // 存栏情况 - 存栏变动折线图数据请求
-    initInventoryLines() {
-      getInventoryLines({}).then((res) => {
-        if (res.code === 10000) {
-          this.inventoryLinesData = res.data;
-        } else {
-          this.inventoryLinesData = {
-            boarStock: [],
-            fatpigStock: [],
-            griceStock: [],
-            month: [],
-            pigletStock: [],
-            sowStock: [],
-          };
-        }
-      });
-    },
-    // 存栏情况 + 生产情况
-    initInventoryAndProduct() {
-      getInventoryAndProduct({}).then((res) => {
-        if (res.code === 10000) {
-          // this.inventoryLinesData = res.data
-          // console.log(res.data);
-          const undefinedData = {
-            stockQuantity: 0,
-          };
-          // this.inventoryPieData = res.data.slice(0, 6)
-          this.inventoryPieData = [
-            res.data["sow_stock"] || undefinedData,
-            res.data["boar_stock"] || undefinedData,
-            res.data["grice_stock"] || undefinedData,
-            res.data["piglet_stock"] || undefinedData,
-            res.data["fatpig_stock"] || undefinedData,
-          ];
-          // console.log("object", this.inventoryPieData);
-          this.inventoryItemsData = [
-            res.data["sow_stock"] ? res.data["sow_stock"].stockQuantity : 0,
-            res.data["sow_stock_1"] ? res.data["sow_stock_1"].stockQuantity : 0,
-            res.data["sow_stock_2"] ? res.data["sow_stock_2"].stockQuantity : 0,
-            res.data["sow_stock_3"] ? res.data["sow_stock_3"].stockQuantity : 0,
-            res.data["boar_stock"] ? res.data["boar_stock"].stockQuantity : 0,
-            res.data["business_stock"]
-              ? res.data["business_stock"].stockQuantity
-              : 0,
-          ];
-          // this.productionPercents = [
-          //   res.data[12].rate * 100,
-          //   res.data[13].rate * 100,
-          //   res.data[14].rate * 100,
-          //   res.data[15].rate * 100,
-          //   res.data[16].rate * 100,
-          // ];
-          // this.productionPercents = [res.data[12].rate*100, res.data[13].rate*100, res.data[14].rate*100, res.data[15].rate*100, res.data[16].rate*100]
-          // this.productionItems = [res.data[17].stockQuantity, res.data[18].stockQuantity, res.data[19].stockQuantity, res.data[20].stockQuantity, res.data[21].stockQuantity, res.data[22].stockQuantity, res.data[23].stockQuantity, res.data[24].stockQuantity]
-        } else {
-          const undefinedData = {
-            stockQuantity: 0,
-          };
-          // this.inventoryPieData = res.data.slice(0, 6)
-          this.inventoryPieData = [
-            res.data["sow_stock"] || undefinedData,
-            res.data["boar_stock"] || undefinedData,
-            res.data["grice_stock"] || undefinedData,
-            res.data["piglet_stock"] || undefinedData,
-            res.data["fatpig_stock"] || undefinedData,
-          ];
-          // console.log("object", this.inventoryPieData);
-          this.inventoryItemsData = [
-            res.data["sow_stock"] ? res.data["sow_stock"].stockQuantity : 0,
-            res.data["sow_stock_1"] ? res.data["sow_stock_1"].stockQuantity : 0,
-            res.data["sow_stock_2"] ? res.data["sow_stock_2"].stockQuantity : 0,
-            res.data["sow_stock_3"] ? res.data["sow_stock_3"].stockQuantity : 0,
-            res.data["boar_stock"] ? res.data["boar_stock"].stockQuantity : 0,
-            res.data["business_stock"]
-              ? res.data["business_stock"].stockQuantity
-              : 0,
-          ];
-          this.$message.warning(res.message);
-        }
-      });
-    },
-    // // 经营分析 - 销售改变
-    // initSalesChange() {
-    //   getSalesChange({}).then((res) => {
-    //     if (res.code === 10000) {
-    //       this.weekSales = res.data.quantityAll;
-    //       this.weekSalesChange = res.data.quantityType
-    //         ? res.data.quantityPercentage
-    //         : -res.data.quantityPercentage;
-    //       this.weekSalesVolume = res.data.saleAll;
-    //       this.weekSalesVolumeChange = res.data.saleType
-    //         ? res.data.salePercentage
-    //         : -res.data.salePercentage;
-    //     } else {
-    //       this.weekSales = 0;
-    //       this.weekSalesChange = 0;
-    //       this.weekSalesVolume = 0;
-    //       this.weekSalesVolumeChange = 0;
-    //     }
-    //   });
-    // },
-    // // 经营分析 - 销售情况图
-    // initSalesChart() {
-    //   const params = {
-    //     beginDate: this.getSalesDates[0] || "",
-    //     endDate: this.getSalesDates[1] || "",
-    //   };
-    //   console.log("我要放参数了", params);
-    //   getSalesChart(params).then((res) => {
-    //     if (res.code === 10000) {
-    //       this.salesChartData = res.data;
-    //       console.log(this.salesChartData);
-    //     }
-    //   });
-    // },
-    // 经营分析 - 成本分析
-    initCostData() {
-      getCostData({}).then((res) => {
-        // console.log(res);
-        if (res.code === 10000) {
-          this.costHisData = [
-            res.data["total"],
-            res.data["baseGroup"],
-            res.data["pigletGroup"],
-            res.data["fattenPig"],
-            res.data["replaceGilt"],
-          ];
-          this.costPieData = this.costHisData[this.costIndex];
-        }
-      });
-    },
-    // // 应收排名
-    // initYingShou() {
-    //   getYingShou({}).then((res) => {
-    //     console.log("应收", res);
-    //     if (res.code === 10000) {
-    //       this.yingshouTableData = res.data;
-    //     }
-    //   });
-    // },
-    // 应付排名
-    initYingFu() {
-      getYingFu({}).then((res) => {
-        // console.log("应付", res);
-        if (res.code === 10000) {
-          this.yingfuTableData = res.data;
-        }
-      });
-    },
-    // 安全库存报警
-    initSafeInventory() {
-      getSafeInventory({
-        current: this.pageNum,
-        size: this.size,
-      }).then((res) => {
-        // console.log(res);
-        if (res.code === 10000) {
-          this.safetyTableData = res.data.records;
-          this.total = res.data.total;
-        }
-      });
-    },
-    // 生产情况
-    initProductionCondition() {
-      getProductionCondition({}).then((res) => {
-        if (res.code === 10000) {
-          this.productionPercents = [
-            { ...res.data["grice_rate"], color: "rgb(112,249,250)" },
-            { ...res.data["piglet_rate"], color: "rgb(51, 211, 137)" },
-            { ...res.data["fatpig_rate"], color: "rgb(255, 125, 0)" },
-            { ...res.data["break_rate"], color: "rgb(2, 167, 240)" },
-            { ...res.data["breed_rate"], color: "rgb(112, 0, 217)" },
-          ];
-          this.productionItems = [
-            res.data["avg_farrow_1"].stockQuantity,
-            res.data["avg_farrow_2"].stockQuantity,
-            res.data["avg_farrow_3"].stockQuantity,
-            res.data["break_grice"].stockQuantity,
-            res.data["avg_weight"].stockQuantity,
-            "",
-            res.data["nest_times"].stockQuantity,
-            res.data["psy"].stockQuantity,
-          ];
-        }
-      });
-    },
-    // 重要指标折线图
-    initImportantData() {
-      getImportantData({
-        startDate: this.importantDates[0],
-        endDate: this.importantDates[1],
-        type: this.importantValue,
-      }).then((res) => {
-        const types = [
-          [
-            {
-              type: "break_rate",
-              name: "七日断配率",
-            },
-          ],
-          [
-            {
-              type: "avg_farrow_1",
-              name: "平均窝产仔猪数",
-            },
-            {
-              type: "avg_farrow_2",
-              name: "平均窝产活仔数",
-            },
-            {
-              type: "avg_farrow_3",
-              name: "平均窝产正常仔数",
-            },
-          ],
-          [
-            {
-              type: "avg_weight",
-              name: "平均断奶窝重",
-            },
-            {
-              type: "break_grice",
-              name: "窝断奶仔猪数",
-            },
-          ],
-          [
-            {
-              type: "fatpig_rate",
-              name: "肥猪成活率",
-            },
-            {
-              type: "grice_rate",
-              name: "产房成活率",
-            },
-            {
-              type: "piglet_rate",
-              name: "保育成活率",
-            },
-          ],
-        ];
-        this.importantData = [];
-        types[this.importantValue - 1].forEach((item) => {
-          this.importantData.push({
-            ...res.data[item.type],
-            name: item.name, // 各项名称
-          });
-        });
-        this.importantTitle = {
-          isPercentage: res.data["isPercentage"],
-          isWeight: res.data["isWeight"],
-          isHead: res.data["isHead"],
-        };
-        // console.log("重要指标数据----------------", this.importantTitle);
-      });
-    },
-    // 重要指标的 type 改变
-    changeImportantValue() {
-      this.initImportantData();
-    },
-    // 重要指标的时间改变
-    changeImportantDates() {
-      this.initImportantData();
-    },
-    // 成本分析 - 数据改变
-    changeCostIndex(value) {
-      this.costIndex = value;
-      this.costPieData = this.costHisData[value];
-    },
-    // 销售情况
-    initTheSales() {
-      getTheSales({
-        type: this.getSalesDates[0] ? 3 : 2,
-        startDate: this.getSalesDates[0] || undefined,
-        endDate: this.getSalesDates[1] || undefined,
-      }).then((res) => {
-        if (res.code === 10000) {
-          this.monthSales = res.data.nowMoney.toLocaleString();
-          this.monthAmount = res.data.nowQuantity.toLocaleString();
-          this.weekSales = res.data.money;
-          this.weekSalesChange = res.data.moneyPercent;
-          this.weekSalesVolume = res.data.quantity;
-          this.weekSalesVolumeChange = res.data.quantityPercent;
-          // console.log("救命");
-          this.salesChartData = {
-            moneyList: res.data.moneyList,
-            moneyList1: res.data.moneyList1,
-            quantityList: res.data.quantityList,
-            timeList: res.data.timeList,
-          };
-          // console.log(this.salesChartData);
-        }
-      });
-    },
-  },
-  watch: {
-    getSalesDates(newValue) {
-      this.getSalesDates = newValue;
-      this.initTheSales();
-    },
-  },
-};
-</script>
-
-<style scoped>
-.analysis {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-.table-content {
-  padding: 10px 15px 12px;
-}
-
-/* 成本分析echarts图排列 */
-.cost {
-  border-bottom: 1px solid rgba(228, 228, 228, 1);
-  position: relative;
-}
-.cost > .select {
-  position: absolute;
-  right: 0;
-  margin: 20px;
-}
-.cost-content {
-  padding-top: 20px;
-  display: flex;
-}
-.cost-left {
-  flex: 1;
-}
-.cost-right {
-  flex: 1;
-}
-.cost > .label {
-  text-align: center;
-  font-weight: bold;
-  font-size: 18px;
-}
-/* 重要指标 */
-.important {
-  padding: 20px;
-  position: relative;
-  border-bottom: 1px solid rgba(228, 228, 228, 1);
-}
-.important > .condition {
-  position: absolute;
-  right: 0;
-  margin-right: 20px;
-}
-.important-chart {
-  margin-top: 20px;
-}
-/* 销售情况 */
-.sales {
-  padding: 20px;
-  padding-bottom: 0;
-}
-.sales-title {
-  padding-left: 20px;
-  font-size: 18px;
-  font-weight: bolder;
-}
-.sales-condition {
-  margin-left: 250px;
-}
-.sales-content {
-  padding-top: 20px;
-  width: 100%;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-around;
-}
-.sales-left {
-  width: 15%;
-  line-height: 24px;
-}
-.sales-left > .up {
-  margin-bottom: 5px;
-  /* border-bottom: 1px solid #ccc; */
-}
-.sales-left > .up > label,
-.sales-left > .down > label {
-  display: block;
-  text-align: center;
-  font-size: 13px;
-  color: #999;
-}
-.sales-left > .up > span,
-.sales-left > .down > span {
-  display: block;
-  text-align: center;
-  font-size: 15px;
-  color: #333;
-}
-.sales-left > .up > .sales-change,
-.sales-left > .down > .sales-change {
-  display: flex;
-  justify-content: space-around;
-  font-size: 13px;
-}
-/* 三角形 */
-.triangle-change {
-  display: inline-block;
-  width: 8px;
-  height: 8px;
-  border-style: solid;
-  border-width: 8px;
-  margin-right: 20px;
-}
-.triangle-up {
-  border-color: transparent transparent rgb(238, 16, 16) transparent;
-}
-.triangle-down {
-  border-color: rgb(2, 112, 2) transparent transparent transparent;
-  position: relative;
-  top: 7px;
-}
-.color-up {
-  color: rgb(238, 16, 16);
-}
-.color-down {
-  color: rgb(2, 112, 2);
-}
-/* 销售情况右侧 */
-.sales-right {
-  width: 85%;
-  border-left: 1px solid rgba(228, 228, 228, 1);
-  height: 300px;
-}
-</style>

+ 0 - 13
src/views/PdcData/CheckLog.vue

@@ -1,13 +0,0 @@
-<template>
-  <div>盘猪记录</div>
-</template>
-
-<script>
-export default {
-  name: "CheckLog"
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 223
src/views/PdcData/CheckPig.vue

@@ -1,223 +0,0 @@
-<template>
-  <div>
-<!--    <div id="chart"></div>-->
-  </div>
-</template>
-
-<script>
-export default {
-  name: "CheckPig",
-  data() {
-    return {
-      myChart: null,
-      timer: null
-    }
-  },
-  methods: {
-    init() {
-      let minAngle = 10;// 最小扇形区域为30
-      let data = [{name: '1', value: 200, }, {name: '2', value: 500, }, {name: '3', value: 100, },{name: '4', value: 1000, } ]
-      for ( let i = 0; i < data.length; i++ ) { //某项数据为0时,最小扇形区域为0
-        if ( data[ i ].value === 0 ) {
-          minAngle = 0;
-          break;
-        }
-      }
-      const pieValue = data.map( v => {
-        return v.value;
-      } )
-      const sum = pieValue.reduce( ( prev, cur ) => {//数据值的总和
-        return prev + cur;
-      }, 0 );
-      const sum2 = pieValue.reduce( ( prev, cur ) => {
-        if ( cur < sum / 12 && cur > 0 ) {//某个值大于0小于总和的1/12即30时,按30计算和
-          return prev + sum / 12;
-        }
-        return prev + cur;
-      }, 0 );
-      let initPieValue = pieValue[ 0 ];// 初始值
-      if ( initPieValue < sum / 12 && initPieValue > 0 ) {
-        initPieValue = sum / 12;
-      }
-      const option = {
-        color: [ '#44bbf8', '#93e588', '#ffd87b', '#f88071' ],
-        series: [
-          {
-            name: '测试',
-            type: 'pie',
-            radius: [ '30%', '60%' ],
-            center: ['40%', '50%'],
-            clockWise: false,
-            clickable: false,
-            startAngle: 300,
-            minAngle: minAngle,
-            avoidLabelOverlap: false,
-            itemStyle: {
-              borderRadius: 5,
-            },
-            label: {
-              show: false
-            },
-            emphasis: {
-              label: {
-                show: true,
-                formatter: "{a} \n{b}: {c} ({d}%)",
-                color: '#fff',
-                fontWeight: 'bold',
-                fontSize: 18
-              }
-            },
-          labelLine: {
-            normal: {
-              show: false
-            }
-          },
-          data: data
-        }
-
-      ],
-        animationDuration: 0,
-        animationDurationUpdate: 1000,
-        animationEasing: 'linear',
-        animationEasingUpdate: 'linear'
-    };
-      this.myChart.setOption( option );
-      this.myChart.dispatchAction( { type: 'highlight', seriesIndex: 0, dataIndex: 0 } );
-      let preDataIndex = 0;
-      // 开始循环
-      this.timer = setInterval(() => {
-        if(preDataIndex > 3 ) {
-          preDataIndex = 0;
-        }
-        const sum1 = pieValue.reduce( ( prev, cur, index ) => {
-          if ( index < preDataIndex ) {
-            if ( cur < sum / 12 && cur > 0 ) {
-              return prev + sum / 12; // 饼图的扇形最小角度设置为30,占圆的1/12
-
-            }
-
-            return prev + cur;
-
-          }
-
-          return prev;
-
-        }, 0 );
-
-        let curPieValue = pieValue[ preDataIndex ];
-
-        if ( curPieValue < sum / 12 && curPieValue > 0 ) {
-          curPieValue = sum / 12;
-        }
-        this.myChart.dispatchAction({
-          type: 'downplay',
-          seriesIndex: 0,
-          // dataIndex: preDataIndex  === 0 ? 3 : preDataIndex - 1
-        });
-        option.series[ 0 ].startAngle = 300 - ( sum1 / sum2 * 360 + curPieValue / sum2 * 360 / 2 );// 开始渲染图形的角度
-        //
-        this.myChart.setOption( option );
-
-        window.setTimeout( () => {
-          this.myChart.dispatchAction( {
-            type: 'highlight',
-            seriesIndex: 0,
-            dataIndex: preDataIndex
-          } );
-          this.myChart.dispatchAction({
-            type: 'showTip',
-            // 可选,系列 index,可以是一个数组指定多个系列
-            seriesIndex: 0,
-            // 可选,数据的 index
-            dataIndex: preDataIndex,
-          })
-          preDataIndex++;
-
-        }, 1500);
-      }, 8000)
-      let that = this;
-      this.myChart.on('mouseover', (v) => {
-        this.myChart.dispatchAction({
-          type: 'downplay',
-          seriesIndex: 0,
-          // dataIndex: preDataIndex  === 0 ? 3 : preDataIndex - 1
-        });
-        preDataIndex = v.dataIndex;
-        this.myChart.dispatchAction( {
-          type: 'highlight',
-          seriesIndex: 0,
-          dataIndex: preDataIndex
-        });
-        clearInterval(that.timer);
-      })
-      this.myChart.on('mouseout', () => {
-        this.timer = setInterval(() => {
-          if(preDataIndex > 3 ) {
-            preDataIndex = 0;
-          }
-          const sum1 = pieValue.reduce( ( prev, cur, index ) => {
-            if ( index < preDataIndex ) {
-              if ( cur < sum / 12 && cur > 0 ) {
-                return prev + sum / 12; // 饼图的扇形最小角度设置为30,占圆的1/12
-
-              }
-
-              return prev + cur;
-
-            }
-
-            return prev;
-
-          }, 0 );
-
-          let curPieValue = pieValue[ preDataIndex ];
-
-          if ( curPieValue < sum / 12 && curPieValue > 0 ) {
-            curPieValue = sum / 12;
-          }
-          this.myChart.dispatchAction({
-            type: 'downplay',
-            seriesIndex: 0,
-            // dataIndex: preDataIndex  === 0 ? 3 : preDataIndex - 1
-          });
-          option.series[ 0 ].startAngle = 300 - ( sum1 / sum2 * 360 + curPieValue / sum2 * 360 / 2 );// 开始渲染图形的角度
-          //
-          this.myChart.setOption( option );
-
-          window.setTimeout( () => {
-            this.myChart.dispatchAction( {
-              type: 'highlight',
-              seriesIndex: 0,
-              dataIndex: preDataIndex
-            } );
-            this.myChart.dispatchAction({
-              type: 'showTip',
-              // 可选,系列 index,可以是一个数组指定多个系列
-              seriesIndex: 0,
-              // 可选,数据的 index
-              dataIndex: preDataIndex,
-            })
-            preDataIndex++;
-
-          }, 1500);
-        }, 8000)
-      })
-
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chart'));
-    // this.init()
-  },
-  beforeDestroy() {
-    clearInterval(this.timer)
-  }
-}
-</script>
-
-<style scoped>
-  #chart {
-    width: 500px;
-    height: 500px;
-  }
-</style>

+ 0 - 224
src/views/PdcData/analysis/ChartInventoryLines.vue

@@ -1,224 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-08 17:24:29
- * @LastEditTime: 2021-12-22 10:27:54
- * @LastEditors: Please set LastEditors
- * @Description: 存栏结构 - 存栏变动折线图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ChartInventoryLines.vue
--->
-<template>
-  <div class="chart-inventory-lines">
-    <div id="chartLines"></div>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    data: {
-      type: Object,
-      required: true,
-      default: () => ({
-        month: [],
-      }),
-    },
-  },
-  methods: {
-    init() {
-      let flag = "";
-      if (this.data.month.length === 0) {
-        flag = "暂无数据";
-      }
-      let options = {
-        title: {
-          text: "存栏变动",
-          x: 10,
-          y: 0,
-          subtext: flag,
-        },
-        tooltip: {
-          trigger: "axis",
-        },
-        // legend: {
-        //   data: ['头']
-        // },
-        color: ["#3aa0ff", "#403DEA", "#226942", "#1AD06C", "#975fe4"],
-        grid: {
-          top: "20%",
-          left: "10%",
-          bottom: "10%",
-          right: "10%",
-        },
-        xAxis: [
-          {
-            type: "category",
-            name: "月",
-            data: this.data.month,
-            axisPointer: {
-              type: "shadow",
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: true,
-            },
-          },
-        ],
-        //[
-        yAxis: {
-          type: "value",
-          name: "头",
-          // axisLabel: {
-          //   formatter: '{value} °C'
-          // },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#6e7079",
-            },
-          },
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        },
-        // {
-        //   type: 'value',
-        //   name: '湿度',
-        //   axisLabel: {
-        //     formatter: '{value} RH'
-        //   },
-        //   axisLine: {
-        //     show: false,
-        //     lineStyle: {
-        //       color: '#6e7079',
-        //     }
-        //   },
-        //   axisTick:{
-        //     show:false
-        //   },
-        //   // splitLine:{
-        //   //   show:false
-        //   // }
-        // }
-        //],
-        series: [
-          {
-            name: "头",
-            type: "line",
-            smooth: false,
-            data: this.data.sowStock,
-            itemStyle: {
-              normal: {
-                color: "#3aa0ff",
-                lineStyle: {
-                  color: "#3aa0ff",
-                },
-              },
-            },
-          },
-          {
-            name: "头",
-            type: "line",
-            smooth: false,
-            data: this.data.boarStock,
-            itemStyle: {
-              normal: {
-                color: "#403DEA",
-                lineStyle: {
-                  color: "#403DEA",
-                },
-              },
-            },
-          },
-          {
-            name: "头",
-            type: "line",
-            smooth: false,
-            data: this.data.griceStock,
-            itemStyle: {
-              normal: {
-                color: "#226942",
-                lineStyle: {
-                  color: "#226942",
-                },
-              },
-            },
-          },
-          {
-            name: "头",
-            type: "line",
-            smooth: false,
-            data: this.data.pigletStock,
-            itemStyle: {
-              normal: {
-                color: "#1AD06C",
-                lineStyle: {
-                  color: "#1AD06C",
-                },
-              },
-            },
-          },
-          {
-            name: "头",
-            type: "line",
-            smooth: false,
-            data: this.data.fatpigStock,
-            itemStyle: {
-              normal: {
-                color: "#C03DEA",
-                lineStyle: {
-                  color: "#C03DEA",
-                },
-              },
-            },
-          },
-          // {
-          //   name: '湿度',
-          //   type: 'line',
-          //   smooth: false,
-          //   yAxisIndex: 1,
-          //   data: [20, 22, 33, 45, 63, 102, 23, 24, 23, 65, 50, 62]
-          // }
-        ],
-      };
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("chartLines"));
-    this.init();
-  },
-  watch: {
-    data: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-
-<style scoped>
-.chart-inventory-lines {
-  display: inline-block;
-  width: 50%;
-  height: 280px;
-}
-#chartLines {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 192
src/views/PdcData/analysis/ChartInventoryPie.vue

@@ -1,192 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-30 15:46:57
- * @LastEditTime: 2021-12-09 17:20:30
- * @LastEditors: Please set LastEditors
- * @Description: 存栏结构图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ChartInventoryPie.vue
--->
-<template>
-  <div class="chart-inventory-pie">
-    <div id="chartPie"></div>
-  </div>
-</template>
-<script>
-export default {
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    data: {
-      type: Array,
-      required: true,
-    },
-  },
-  methods: {
-    init() {
-      const _this = this;
-      let total = this.data.reduce(
-        (prev, item) => prev + item.stockQuantity,
-        0
-      );
-      let options = {
-        title: {
-          text: "存栏结构",
-          x: 20,
-          y: 20,
-        },
-        grid: {
-          x: 100,
-        },
-        tooltip: {
-          trigger: "item",
-          formatter: function({ name, value, percent }) {
-            return (
-              name + ":" + value + "头&nbsp;&nbsp;&nbsp;&nbsp;" + percent + "%"
-            );
-          },
-        },
-        legend: {
-          top: "25%",
-          left: "55%",
-          orient: "vertical",
-          icon: "circle",
-          selectedMode: false, // 取消右侧项选中
-          itemGap: 20, // 各项间隔
-          textStyle: {
-            fontSize: 15,
-            color: "#666",
-          },
-          formatter: function(name) {
-            var legendIndex = 0;
-            const clientLabels = [];
-            // 将右侧文字备注放上去
-            _this.data.forEach((item) => {
-              let percentStr = "";
-              if (item.stockQuantity !== 0) {
-                percentStr =
-                  (parseFloat(item.stockQuantity / total) * 100).toFixed(2) +
-                  "%, ";
-              }
-              clientLabels.push({
-                name: item.stockName,
-                percent: percentStr,
-                number: item.stockQuantity,
-              });
-            });
-            clientLabels.forEach(function(value, i) {
-              if (value.name == name) {
-                legendIndex = i;
-              }
-            });
-            return (
-              name +
-              " (" +
-              clientLabels[legendIndex].percent +
-              clientLabels[legendIndex].number +
-              "头" +
-              ") "
-            );
-          },
-        },
-        graphic: [
-          {
-            type: "text",
-            left: "27%",
-            top: "43%",
-            style: {
-              text: "总存栏",
-              fontSize: 15,
-              fill: "rgb(192, 188, 189)",
-            },
-          },
-          {
-            type: "text",
-            left: "25%",
-            top: "53%",
-            style: {
-              text: total + "头",
-              fontSize: 22,
-              fontWeight: 700,
-            },
-          },
-        ],
-        series: [
-          {
-            name: "Access From",
-            type: "pie",
-            radius: ["60%", "80%"], // 半径
-            center: ["30%", "55%"],
-            avoidLabelOverlap: false,
-            label: {
-              show: false,
-              // position: 'center'
-            },
-            emphasis: {
-              label: {
-                show: false,
-                fontSize: "40",
-                fontWeight: "bold",
-              },
-            },
-            labelLine: {
-              show: false,
-            },
-            itemStyle: {
-              normal: {
-                color: function(colors) {
-                  // 颜色设置
-                  var colorList = [
-                    "#3aa0ff",
-                    "#403DEA",
-                    "#226942",
-                    "#1AD06C",
-                    "#C03DEA",
-                  ];
-                  return colorList[colors.dataIndex];
-                },
-                borderWidth: 5, // 设置各项空隙
-                borderColor: "#fff",
-              },
-            },
-            data: [
-              { value: this.data[0].stockQuantity, name: "母猪存栏" },
-              { value: this.data[1].stockQuantity, name: "公猪存栏" },
-              { value: this.data[2].stockQuantity, name: "哺乳仔猪存栏" },
-              { value: this.data[3].stockQuantity, name: "保育猪存栏" },
-              { value: this.data[4].stockQuantity, name: "育肥猪存栏" },
-            ],
-          },
-        ],
-      };
-
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("chartPie"));
-    this.init();
-  },
-  watch: {
-    data: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.chart-inventory-pie {
-  display: inline-block;
-  width: 45%;
-  height: 300px;
-}
-#chartPie {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 215
src/views/PdcData/analysis/CostHistogram.vue

@@ -1,215 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-12 09:10:42
- * @LastEditTime: 2021-12-22 10:29:13
- * @LastEditors: Please set LastEditors
- * @Description: 成本分析的柱状图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostHistogram.vue
--->
-<template>
-  <div class="cost-histogram">
-    <div id="costHistogram"></div>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    data: {
-      type: Array,
-      default: () => [],
-    },
-    xAxisData: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  methods: {
-    init() {
-      const commonSeriesItem = {
-        name: "Forest",
-        type: "bar",
-        barGap: 0,
-        emphasis: {
-          focus: "series",
-        },
-      };
-      let seriesData = [
-        {
-          ...commonSeriesItem,
-          name: "公摊成本",
-          color: "rgb(112,182,3)",
-          data: [],
-        },
-        {
-          ...commonSeriesItem,
-          name: "兽药成本",
-          color: "#2194EA",
-          data: [],
-        },
-        {
-          ...commonSeriesItem,
-          name: "饲料成本",
-          color: "rgb(123,0,255)",
-          data: [],
-        },
-      ];
-      this.data.forEach((item) => {
-        seriesData[0].data.push(item.gtValue);
-        seriesData[1].data.push(item.syValue);
-        seriesData[2].data.push(item.slValue);
-      });
-      let options = {
-        // title: {
-        //   text: '存栏变动',
-        //   x: 10,
-        //   y: 0
-        // },
-        tooltip: {
-          trigger: "axis",
-          // formatter: (value) => {
-          //   return value + "元";
-          // },
-        },
-        // legend: {
-        //   data: ['头']
-        // },
-        // color: ['#3aa0ff', '#4dcb73', '#fad337', '#f2637b', '#975fe4'],
-        grid: {
-          left: "3%",
-          right: "4%",
-          bottom: "3%",
-          containLabel: true,
-        },
-        xAxis: [
-          // {
-          //   type: "value",
-          //   name: "元",
-          //   boundaryGap: [0, 0.01],
-          //   axisPointer: {
-          //     type: "shadow",
-          //   },
-          //   axisLine: {
-          //     show: true,
-          //     lineStyle: {
-          //       color: "#6e7079",
-          //     },
-          //   },
-          //   axisTick: {
-          //     show: false,
-          //   },
-          // },
-          {
-            type: "category",
-            axisTick: {
-              show: false,
-            },
-            axisPointer: {
-              type: "none",
-            },
-            data: this.xAxisData,
-          },
-        ],
-        //[
-        yAxis: {
-          // type: "category",
-          // inverse: true,
-          // axisLabel: {
-          //   // formatter: '{value} °C'
-          //   show: true
-          // },
-          // axisLine: {
-          //   show: true,
-          //   lineStyle: {
-          //     color: '#6e7079',
-          //   }
-          // },
-          // axisTick:{
-          //   show:false
-          // },
-          // splitLine:{
-          //   show:false
-          // }
-          type: "value",
-          name: "元",
-        },
-        // {
-        //   type: 'value',
-        //   name: '湿度',
-        //   axisLabel: {
-        //     formatter: '{value} RH'
-        //   },
-        //   axisLine: {
-        //     show: false,
-        //     lineStyle: {
-        //       color: '#6e7079',
-        //     }
-        //   },
-        //   axisTick:{
-        //     show:false
-        //   },
-        //   // splitLine:{
-        //   //   show:false
-        //   // }
-        // }
-        //],
-        // dataset: [
-        //   {
-        //     dimensions: ['num'],
-        //     source: [
-        //       [32541],
-        //       [82467],
-        //       [54363],
-        //       [64642],
-        //       [40257],
-        //       [95422]
-        //     ]
-        //   },
-        //   {
-        //     transeform: {
-        //       type: 'sort',
-        //       config: {
-        //         dimension: 'num',
-        //         order: 'desc'
-        //       }
-        //     }
-        //   }
-        // ],
-        series: seriesData,
-      };
-      const _this = this;
-      this.myChart.setOption(options);
-      this.myChart.on("click", function(param) {
-        _this.$emit("changeCostIndex", param.dataIndex);
-      });
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("costHistogram"));
-    this.init();
-  },
-  watch: {
-    data: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.cost-histogram {
-  display: inline-block;
-  width: 90%;
-  height: 300px;
-}
-#costHistogram {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 174
src/views/PdcData/analysis/CostPie.vue

@@ -1,174 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-12 08:39:43
- * @LastEditTime: 2021-12-21 10:32:42
- * @LastEditors: Please set LastEditors
- * @Description: 成本分析扇形图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\CostPie.vue
--->
-<template>
-  <div class="cost-pie">
-    <div id="costPie"></div>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    data: {
-      type: Object,
-      default: () => {},
-    },
-    title: {
-      type: String,
-      default: "",
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  methods: {
-    init() {
-      let gtValue = parseFloat(this.data.gtValue);
-      let syValue = parseFloat(this.data.syValue);
-      let slValue = parseFloat(this.data.slValue);
-      let total = gtValue + syValue + slValue;
-      let options = {
-        title: {
-          text: this.title,
-          x: "30%",
-          y: "bottom",
-          textAlign: " center",
-          textStyle: {
-            fontSize: 15,
-            color: "#666",
-          },
-        },
-        grid: {
-          x: 100,
-        },
-        legend: {
-          top: "30%",
-          left: "80%",
-          orient: "vertical",
-          icon: "circle",
-          selectedMode: false, // 取消右侧项选中
-          itemGap: 20, // 各项间隔
-          textStyle: {
-            fontSize: 15,
-            color: "#666",
-          },
-        },
-        series: [
-          {
-            // name: 'Access From',
-            type: "pie",
-            radius: "70%", // 半径
-            center: ["40%", "45%"],
-            avoidLabelOverlap: false,
-            hoverAnimation: false,
-            labelLine: {
-              show: true,
-            },
-            itemStyle: {
-              normal: {
-                color: function(colors) {
-                  // 颜色设置
-                  var colorList = [
-                    "rgb(112,182,3)",
-                    "#2194EA",
-                    "rgb(123,0,255)",
-                    // "rgb(0,215,233)",
-                    // "rgb(255,255,160)",
-                    // "rgb(0,0,255)",
-                  ];
-                  return colorList[colors.dataIndex];
-                },
-                label: {
-                  formatter: (params) => {
-                    // 这里简直完美好吗,解决了文字样式也解决了千分位
-                    let value = params.value.toLocaleString();
-                    let percent = ((params.value / total) * 100).toFixed(2);
-                    if (value === "0") {
-                      return `{b|${params.name}:}\n{c|${value}元}`;
-                    }
-                    return `{b|${params.name}:}\n{c|${value}元}\n{d|${percent}%}`;
-                  },
-                  rich: {
-                    b: {
-                      align: "center",
-                      fontSize: 15,
-                      // lineHeight: 23,
-                    },
-                    c: {
-                      align: "center",
-                      lineHeight: 25,
-                      fontSize: 15,
-                    },
-                    d: {
-                      align: "center",
-                      fontSize: 15,
-                    },
-                  },
-                },
-                labelLine: {
-                  length: 22,
-                },
-              },
-
-              label: {
-                show: false,
-              },
-              // emphasis: {
-              //   label: {
-              //     show: true,
-              //     // formatter: "{b}: {c}%",
-              //     textStyle: {
-              //       fontSize: "15",
-              //     },
-              //   },
-              //   itemStyle: {
-              //     shadowBlur: 10,
-              //     shadowOffsetX: 5,
-              //     shadowColor: "rgba(0, 0, 0, 0.5)",
-              //   },
-              // },
-            },
-            data: [
-              { value: gtValue, name: "公摊成本" },
-              { value: syValue, name: "兽药成本" },
-              { value: slValue, name: "饲料成本" },
-            ],
-          },
-        ],
-      };
-
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("costPie"));
-    this.init();
-  },
-  watch: {
-    data: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.cost-pie {
-  display: inline-block;
-  width: 100%;
-  height: 300px;
-}
-#costPie {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 210
src/views/PdcData/analysis/ImportantLine.vue

@@ -1,210 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-12 10:31:13
- * @LastEditTime: 2021-12-22 10:29:25
- * @LastEditors: Please set LastEditors
- * @Description: 重要指标
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ImportantLine.vue
--->
-<template>
-  <div class="important-line">
-    <div id="importantLine"></div>
-  </div>
-</template>
-
-<script>
-export default {
-  props: {
-    listData: {
-      type: Array,
-      default: () => [],
-    },
-    isPercentage: {
-      type: Number,
-      default: 0,
-    },
-    isWeight: {
-      type: Number,
-      default: 0,
-    },
-    isHead: {
-      type: Number,
-      default: 0,
-    },
-  },
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  methods: {
-    init() {
-      let seriesData = [];
-      let legendData = [];
-      // [
-      //     {
-      //       name: "头",
-      //       type: "line",
-      //       smooth: false,
-      //       data: [
-      //         1500,
-      //       ],
-      //       itemStyle: {
-      //         normal: {
-      //           color: "rgb(251,222,107)",
-      //           lineStyle: {
-      //             color: "rgb(251,222,107)",
-      //             width: 3,
-      //           },
-      //         },
-      //       },
-      //     },
-      //   ],
-      this.listData.forEach((item) => {
-        // let yName = ["头", "百分比", "千克"];
-        legendData.push(item.name);
-        seriesData.push({
-          name: item.name,
-          type: "line",
-          smooth: false,
-          data: item.value,
-        });
-      });
-      let yAxisData = [];
-      if (this.isWeight) {
-        yAxisData.push({
-          type: "value",
-          name: "千克",
-          axisLabel: {
-            show: true,
-            formatter: "{value}",
-          },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#6e7079",
-            },
-          },
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        });
-      }
-      if (this.isPercentage) {
-        yAxisData.push({
-          type: "value",
-          name: "百分比",
-          axisLabel: {
-            show: true,
-            formatter: "{value}",
-          },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#6e7079",
-            },
-          },
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        });
-      }
-      if (this.isHead) {
-        yAxisData.push({
-          type: "value",
-          name: "头",
-          axisLabel: {
-            show: true,
-            formatter: "{value}",
-          },
-          axisLine: {
-            show: true,
-            lineStyle: {
-              color: "#6e7079",
-            },
-          },
-          axisTick: {
-            show: false,
-          },
-          splitLine: {
-            show: false,
-          },
-        });
-      }
-      let options = {
-        title: {
-          text: "重要指标",
-          x: 10,
-          y: 0,
-        },
-        tooltip: {
-          trigger: "axis",
-        },
-        legend: {
-          data: legendData,
-          padding: [20, 0, 0, 0],
-        },
-        color: ["#3aa0ff", "#4dcb73", "#fad337", "#f2637b", "#975fe4"],
-        grid: {
-          top: "20%",
-          left: "10%",
-          bottom: "10%",
-          right: "10%",
-        },
-        xAxis: [
-          {
-            type: "category",
-            data: this.listData[0].time,
-            axisPointer: {
-              type: "none",
-            },
-            axisLine: {
-              show: true,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: true,
-            },
-          },
-        ],
-        //[
-        yAxis: yAxisData,
-        series: seriesData,
-      };
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("importantLine"));
-    // this.init();
-  },
-  watch: {
-    listData: {
-      handler() {
-        this.init();
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-
-<style scoped>
-.important-line {
-  /* display: inline-block; */
-  width: 100%;
-  height: 300px;
-}
-#importantLine {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 197
src/views/PdcData/analysis/InventoryItems.vue

@@ -1,197 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-11 10:10:26
- * @LastEditTime: 2021-12-02 10:21:07
- * @LastEditors: Please set LastEditors
- * @Description: 存栏情况 - 下面 item 的数字
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\InventoryItems.vue
--->
-<template>
-  <div class="inventory-items">
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="picture01 picture"></div>
-      </template>
-      <template v-slot:dataName>
-        <span>母猪存栏</span>
-      </template>
-      <template v-slot:dataNum>
-        <span>{{ data[0] }}</span>
-      </template>
-    </inventory-item>
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="picture02 picture"></div>
-      </template>
-      <template v-slot:dataName>
-        <div>
-          妊娠猪存栏
-        </div>
-      </template>
-      <template v-slot:dataNum>
-        <div>
-          {{ data[1] }}
-        </div>
-      </template>
-    </inventory-item>
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="picture03 picture"></div>
-      </template>
-      <template v-slot:dataName>
-        <div>
-          哺乳母猪存栏
-        </div>
-      </template>
-      <template v-slot:dataNum>
-        <div>
-          {{ data[2] }}
-        </div>
-      </template>
-    </inventory-item>
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="parent">
-          <div class="picture04 picture"></div>
-          <div class="blank"></div>
-        </div>
-      </template>
-      <template v-slot:dataName>
-        <div>
-          空怀猪存栏
-        </div>
-      </template>
-      <template v-slot:dataNum>
-        <div>
-          {{ data[3] }}
-        </div>
-      </template>
-    </inventory-item>
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="picture05 picture"></div>
-      </template>
-      <template v-slot:dataName>
-        <div>
-          公猪存栏
-        </div>
-      </template>
-      <template v-slot:dataNum>
-        <div>
-          {{ data[4] }}
-        </div>
-      </template>
-    </inventory-item>
-    <inventory-item>
-      <template v-slot:picture>
-        <div class="parent">
-          <div class="picture06 picture"></div>
-          <div class="sale"></div>
-        </div>
-      </template>
-      <template v-slot:dataName>
-        <div>
-          商品猪存栏
-        </div>
-      </template>
-      <template v-slot:dataNum>
-        <div>
-          {{ data[5] }}
-        </div>
-      </template>
-    </inventory-item>
-  </div>
-</template>
-<script>
-import InventoryItem from "components/erp/InventoryItem.vue";
-
-export default {
-  props: {
-    data: {
-      type: Array,
-      default: () => [],
-    },
-  },
-  data() {
-    return {
-      getData: [],
-    };
-  },
-  components: {
-    InventoryItem,
-  },
-  mounted() {
-    // console.log("-----------------------");
-    // console.log(this.data);
-  },
-  watch: {
-    data: {
-      handler(newValue) {
-        this.getData = newValue;
-      },
-      deep: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.inventory-items {
-  margin: 10px 5px 0px;
-  display: flex;
-}
-/* 图片统一格式 */
-.picture {
-  width: 150px;
-  height: 100px;
-}
-/* 母猪存栏图片 */
-.picture01 {
-  background: url("~assets/images/erpAnalysis/u3827.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 妊娠 */
-.picture02 {
-  background: url("~assets/images/erpAnalysis/u3828.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 哺乳 */
-.picture03 {
-  background: url("~assets/images/erpAnalysis/u3829.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 空怀 */
-.picture04 {
-  background: url("~assets/images/erpAnalysis/u3831.svg") no-repeat 50%;
-  background-size: 50%;
-}
-.parent {
-  position: relative;
-}
-.blank {
-  background: url("~assets/images/erpAnalysis/u3832.svg") no-repeat 50%;
-  position: absolute;
-  top: 0;
-  left: 5px;
-  width: 150px;
-  height: 100px;
-}
-/* 公猪 */
-.picture05 {
-  background: url("~assets/images/erpAnalysis/u3686.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 商品 */
-.picture06 {
-  background: url("~assets/images/erpAnalysis/u3834.svg") no-repeat 50%;
-  background-size: 50%;
-}
-.sale {
-  background: url("~assets/images/erpAnalysis/u3835.svg") no-repeat 50%;
-  position: absolute;
-  top: 30px;
-  right: 53px;
-  width: 30px;
-  height: 30px;
-  background-size: 80%;
-}
-</style>

+ 0 - 46
src/views/PdcData/analysis/ProductionDonuts.vue

@@ -1,46 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-11 14:56:37
- * @LastEditTime: 2021-12-22 10:30:13
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ProductionDonuts.vue
--->
-<template>
-  <div class="production-donuts">
-    <production-donut v-for="item in datas" :key="item.id" v-bind="item">
-    </production-donut>
-  </div>
-</template>
-<script>
-import ProductionDonut from "components/erp/ProductionDonut";
-
-export default {
-  props: {
-    data: {
-      type: Array,
-      required: true,
-    },
-  },
-  data() {
-    return {
-      datas: [],
-    };
-  },
-  watch: {
-    data: {
-      handler(newValue) {
-        this.datas = newValue;
-      },
-    },
-  },
-  components: {
-    ProductionDonut,
-  },
-};
-</script>
-<style scoped>
-.production-donuts {
-  padding-left: 70px;
-}
-</style>

+ 0 - 213
src/views/PdcData/analysis/ProductionItems.vue

@@ -1,213 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-11 15:40:26
- * @LastEditTime: 2021-11-28 17:50:33
- * @LastEditors: Please set LastEditors
- * @Description: 生产情况下面的8个
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\ProductionItems.vue
--->
-<template>
-  <div>
-    <div class="inventory-items">
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="picture01 picture"></div>
-        </template>
-        <template v-slot:dataName>
-          <span>平均窝产仔数</span>
-        </template>
-        <template v-slot:dataNum>
-          <span>{{ data[0] }}</span>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="parent">
-            <div class="picture02 picture"></div>
-            <div class="live"></div>
-          </div>
-        </template>
-        <template v-slot:dataName>
-          <div>平均窝产活仔数</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[1] }}</div>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="parent">
-            <div class="picture03 picture"></div>
-            <div class="letter03"></div>
-          </div>
-        </template>
-        <template v-slot:dataName>
-          <div>平均窝产正常仔数</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[2] }}</div>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="picture04 picture"></div>
-        </template>
-        <template v-slot:dataName>
-          <div>窝断奶仔猪数</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[3] }}</div>
-        </template>
-      </inventory-item>
-    </div>
-    <div class="inventory-items">
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="picture05 picture"></div>
-        </template>
-        <template v-slot:dataName>
-          <div>平均窝断奶重</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[4] }}</div>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="picture06 picture"></div>
-        </template>
-        <template v-slot:dataName>
-          <div>非生产天数</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[5] }}天</div>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="parent">
-            <div class="picture07 picture"></div>
-            <div class="sale"></div>
-          </div>
-        </template>
-        <template v-slot:dataName>
-          <div>年产窝数</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[6] }}</div>
-        </template>
-      </inventory-item>
-      <inventory-item>
-        <template v-slot:picture>
-          <div class="border">
-            <span>PSY</span>
-          </div>
-        </template>
-        <template v-slot:dataName>
-          <div>PSY</div>
-        </template>
-        <template v-slot:dataNum>
-          <div>{{ data[7] }}</div>
-        </template>
-      </inventory-item>
-    </div>
-  </div>
-</template>
-<script>
-import InventoryItem from "components/erp/InventoryItem.vue";
-
-export default {
-  components: {
-    InventoryItem,
-  },
-  props: {
-    data: {
-      type: Array,
-      required: true,
-    },
-  },
-};
-</script>
-<style scoped>
-.inventory-items {
-  margin: 10px 5px 0px;
-  display: flex;
-  flex-direction: row;
-}
-/* 图片统一格式 */
-.picture {
-  width: 150px;
-  height: 100px;
-}
-.parent {
-  position: relative;
-}
-/* 平均窝产仔图片 */
-.picture01 {
-  background: url("~assets/images/erpAnalysis/u3836.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 平均窝产活仔 */
-.picture02 {
-  background: url("~assets/images/erpAnalysis/u3836.svg") no-repeat 50%;
-  background-size: 50%;
-}
-.live {
-  background: url("~assets/images/erpAnalysis/u3838.svg") no-repeat 50%;
-  position: absolute;
-  top: 36px;
-  right: 56px;
-  width: 30px;
-  height: 30px;
-  background-size: 70%;
-}
-/* 正常仔 */
-.picture03 {
-  background: url("~assets/images/erpAnalysis/u3836.svg") no-repeat 50%;
-  background-size: 50%;
-}
-.letter03 {
-  background: url("~assets/images/erpAnalysis/u3840.svg") no-repeat 50%;
-  position: absolute;
-  top: 36px;
-  right: 56px;
-  width: 30px;
-  height: 30px;
-  background-size: 50%;
-}
-/* 断奶 */
-.picture04 {
-  background: url("~assets/images/erpAnalysis/u3841.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 平均断奶重 */
-.picture05 {
-  background: url("~assets/images/erpAnalysis/u3843.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* 非生产天数 */
-.picture06 {
-  background: url("~assets/images/erpAnalysis/u3844.svg") no-repeat 50%;
-  background-size: 40%;
-}
-/* 年产窝数 */
-.picture07 {
-  background: url("~assets/images/erpAnalysis/u3842.svg") no-repeat 50%;
-  background-size: 50%;
-}
-/* PSY */
-.border {
-  margin: 15px 18px;
-  border: 1px solid rgba(228, 228, 228, 1);
-  border-radius: 10px;
-  height: 70px;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  align-items: center;
-}
-.border > span {
-  font-weight: bold;
-  font-size: 22px;
-}
-</style>

+ 0 - 192
src/views/PdcData/analysis/SalesChart.vue

@@ -1,192 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-10-12 13:45:04
- * @LastEditTime: 2021-12-09 17:00:45
- * @LastEditors: Please set LastEditors
- * @Description: 销售情况面积图
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\SalesChart.vue
--->
-<template>
-  <div class="sales-chart">
-    <div id="salesChart"></div>
-  </div>
-</template>
-<script>
-import { mapState } from "vuex";
-export default {
-  name: "ChartWater",
-  data() {
-    return {
-      myChart: null,
-    };
-  },
-  props: {
-    // id: {
-    //   type: String,
-    //   default: () => "0",
-    // },
-    data: {
-      type: Object,
-      default: () => ({
-        timeList: [],
-      }),
-    },
-    // dataValue: {
-    //   type: Array,
-    //   default: () => [100, 75, 120, 200, 110, 40, 60]
-    // }
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  methods: {
-    init() {
-      let dataAxis = this.data.timeList;
-      let start = dataAxis.length - 12;
-      let end = dataAxis.length - 1;
-      let quantityList = this.data.quantityList;
-      let moneyListTooltip = this.data.moneyList1;
-      let options = {
-        title: {
-          x: 60,
-          y: 20,
-          text: "近期销售情况",
-          textStyle: {
-            fontSize: 14,
-            color: "#6e7079",
-          },
-        },
-        tooltip: {
-          trigger: "axis",
-          formatter: (params) => {
-            var res = "<div>" + params[0].name + "</div>"; // 字符串形式的html标签会被echarts转换渲染成数据,这个res主要是画的tooltip里的上部分的标题部分
-            const index = this.data.moneyList.findIndex(
-              (item) => item === params[0].value
-            );
-            for (var i = 0; i < params.length; i++) {
-              // console.log(moneyListTooltip[i]);
-              //因为是个数组,所以要遍历拿到里面的数据,并加入到tooltip的数据内容部分里面去
-              res +=
-                `<div style="color: #fff;font-size: 14px; padding:0 12px;">
-                  <span style="display:inline-block;margin-right:5px;border-radius:5px;width:10px;height:10px;background-color:${[
-                    params[i].color, // 默认是小圆点,我们将其修改成有圆角的正方形,这里用的是模板字符串。并拿到对应颜色、名字、数据
-                  ]};"></span>
-                  ${moneyListTooltip[index]}元
-                </div>` +
-                `<div style="color: #fff;font-size: 14px; padding:0 12px;"><span style="display:inline-block;margin-right:5px;border-radius:5px;width:10px;height:10px;background-color:${[
-                  params[i].color,
-                ]};"></span>${quantityList[index]}头</div>`;
-            }
-            return res;
-          },
-        },
-        color: [this.color],
-        dataZoom: [
-          {
-            type: "inside",
-            startValue: start,
-            endValue: end,
-            show: false,
-          },
-        ],
-        xAxis: [
-          {
-            type: "category",
-            data: dataAxis,
-            axisPointer: {
-              type: "none",
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        yAxis: [
-          {
-            type: "value",
-            // name: "元",
-            axisLabel: {
-              formatter: "{value} 元",
-              show: true,
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: "#6e7079",
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-          },
-        ],
-        series: [
-          {
-            name: "元",
-            type: "line",
-            // stack: 'Total',
-            smooth: true,
-            areaStyle: {},
-            emphasis: {
-              focus: "series",
-            },
-            itemStyle: {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label: {
-                  show: false,
-                  textStyle: {
-                    fontSize: 14,
-                  },
-                },
-              },
-            },
-            data: this.data.moneyList,
-          },
-        ],
-      };
-      this.myChart.setOption(options, true);
-    },
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById("salesChart"));
-    this.init();
-  },
-  watch: {
-    data: {
-      handler(newVal) {
-        // console.log("救命");
-        if (newVal) {
-          // console.log("我不理解究竟有什么问题", newVal);
-          // this.myChart.clear();
-          this.init();
-        }
-      },
-      deep: true,
-    },
-    color(newVal) {
-      if (newVal) {
-        // this.myChart.clear();
-        this.init();
-      }
-    },
-  },
-};
-</script>
-<style scoped>
-.sales-chart {
-  width: 100%;
-  height: 100%;
-}
-#salesChart {
-  width: 100%;
-  height: 100%;
-}
-</style>

+ 0 - 65
src/views/PdcData/analysis/WorkInfos.vue

@@ -1,65 +0,0 @@
-<!--
- * @Author: your name
- * @Date: 2021-09-28 11:28:08
- * @LastEditTime: 2021-12-03 13:34:04
- * @LastEditors: Please set LastEditors
- * @Description: 工作看板的预警信息等统计
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\WorkInfos.vue
--->
-<template>
-  <div class="work-info">
-    <el-row>
-      <template v-for="item in dataList">
-        <el-col :span="12" :key="item.id">
-          <div class="item" @click="handleClick(item)">
-            <span class="label">{{ item.label }}</span>
-            <span class="right"
-              >(<span class="number">{{ item.number }}</span
-              >)</span
-            >
-          </div>
-        </el-col>
-      </template>
-    </el-row>
-  </div>
-</template>
-<script>
-export default {
-  props: {
-    dataList: {
-      type: Array,
-      required: true,
-    },
-  },
-  methods: {
-    handleClick(item) {
-      this.$emit("workInfoClick", item);
-    },
-  },
-};
-</script>
-<style scoped>
-.work-info {
-  padding: 20px;
-}
-
-.item {
-  padding: 15px 15px 7px;
-  border-bottom: 1px solid rgba(235, 238, 245, 1);
-  font-size: 13px;
-  margin: 0px 10px;
-  cursor: pointer;
-}
-.item:hover {
-  background-color: #eee;
-}
-.item > .label {
-  color: #bcbcbc;
-}
-.item > .right {
-  float: right;
-}
-.item > .right > .number {
-  color: #f04844;
-}
-</style>

+ 0 - 44
src/views/PdcData/analysis/safetyTable.config.js

@@ -1,44 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-10-11 16:19:57
- * @LastEditTime: 2021-12-06 13:48:45
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\safetyTable.config.js
- */
-export const safetyTableItems = [
-  {
-    prop: 'warningTime',
-    label: '报警时间',
-    minWidth: '200',
-    slotName: 'warningTime'
-  },
-  {
-    prop: 'goods',
-    label: '报警物品',
-    minWidth: '400',
-    slotName: 'goods'
-  },
-  {
-    prop: 'quantity',
-    label: '目前数量',
-    minWidth: '200',
-    slotName: 'quantity'
-  },
-  {
-    prop: 'safeLine',
-    label: '安全存储数量',
-    minWidth: '200',
-    slotName: 'safeLine'
-  },
-  {
-    prop: 'isWarning',
-    label: '是否已报警',
-    minWidth: '200',
-    slotName: 'isWarning'
-  }
-]
-
-export const safetyTableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 38
src/views/PdcData/analysis/salesXForm.config.js

@@ -1,38 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-10-12 10:52:39
- * @LastEditTime: 2021-10-12 10:52:40
- * @LastEditors: Please set LastEditors
- * @Description: 销售的时间
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\salesXForm.config.js
- */
-export const formItems = [
-  {
-    id: 1,
-    type: 'text',
-    text: '今日',
-    value: 1,
-    col: 1
-  },
-  {
-    id: 2,
-    type: 'text',
-    text: '本周',
-    value: 2,
-    col: 1
-  },
-  {
-    id: 3,
-    type: 'text',
-    text: '本月',
-    value: 3,
-    col: 1
-  },
-  {
-    id: 4,
-    type: 'datepicker',
-    placeholder: [],
-    field: 'value1',
-    col: 6
-  }
-]

+ 0 - 38
src/views/PdcData/analysis/table.config.js

@@ -1,38 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-09-28 13:54:21
- * @LastEditTime: 2021-12-21 10:53:09
- * @LastEditors: Please set LastEditors
- * @Description: 生产数据 - ERP数据分析 - 工作看板 的表格
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\table.config.js
- */
-export const tableItems = [
-  {
-    prop: 'tipTime',
-    label: '提醒时间',
-    minWidth: '200',
-    slotName: 'tipTime'
-  },
-  {
-    prop: 'warningContent',
-    label: '内容',
-    minWidth: '400',
-    slotName: 'warningContent'
-  },
-  // {
-  //   prop: 'handleState',
-  //   label: '是否已处理',
-  //   minWidth: '400',
-  //   slotName: 'handleState'
-  // },
-  // {
-  //   prop: 'handleTime',
-  //   label: '处理时间',
-  //   minWidth: '200',
-  //   slotName: 'handleTime'
-  // }
-]
-
-export const tableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 32
src/views/PdcData/analysis/yingshouTable.config.js

@@ -1,32 +0,0 @@
-/*
- * @Author: your name
- * @Date: 2021-10-11 16:12:07
- * @LastEditTime: 2021-12-06 16:12:56
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \hyyfClient\src\views\PdcData\analysis\yingshouTable.config.js
- */
-export const yingshouTableItems = [
-  {
-    prop: 'rank',
-    label: '排名',
-    minWidth: '100',
-    slotName: 'rank'
-  },
-  {
-    prop: 'suppier',
-    label: '供应商',
-    minWidth: '200',
-    slotName: 'suppier'
-  },
-  {
-    prop: 'money',
-    label: '金额',
-    minWidth: '150',
-    slotName: 'number'
-  },
-]
-
-export const yingshouTableShows = {
-  showIndex: false, showSelect: false
-}

+ 0 - 290
src/views/Video/AreaAdmin.vue

@@ -1,290 +0,0 @@
-<template>
-  <div class="area">
-    <!-- 查询   -->
-    <query-conditions :formItems="searchList" @getQueryParams="handleQuery"></query-conditions>
-    <!--  表格   -->
-    <new-table :height="600" :title="title" :listData="areaList" :tableItems="tableItems" :shows="tableShows" @selectionChange="selectionChange">
-      <template v-slot:right>
-        <div>
-          <el-button size="mini" type="primary"  v-if="hasPerm('area:add')" @click="dialogVisible = true">添加区域</el-button>
-
-          <el-button size="mini" type="danger" v-if="hasPerm('area:del')" @click="delAll">批量删除</el-button>
-
-        </div>
-      </template>
-      <template #handler="scope">
-        <el-button size="mini" v-if="hasPerm('area:edit')" @click="edit(scope.row)" style="margin-right: 10px">编辑</el-button>
-        <el-popconfirm
-            title=" 确定要删除这个区域吗?"
-            @confirm="del(scope.row)"
-        >
-          <el-button type="danger" v-if="hasPerm('area:del')" size="mini" slot="reference">删除</el-button>
-        </el-popconfirm>
-      </template>
-    </new-table>
-    <table-footer
-        :totals="total"
-        :size="pageSize"
-        @sizeChange="sizeChange"
-        @pageChange="pageChange"></table-footer>
-    <!-- 新增编辑   -->
-    <el-dialog
-        :title="showType ? '编 辑' : '新 增'"
-        :visible.sync="dialogVisible"
-        width="20%">
-        <div>
-          <el-form ref="form" :model="form" :rules="rules" label-width="80px" size="mini">
-            <el-form-item label="区域名称" prop="areaName">
-              <el-input v-model="form.areaName"></el-input>
-            </el-form-item>
-            <el-form-item label="绑定IP" prop="publicUrl">
-              <el-input v-model="form.publicUrl"></el-input>
-            </el-form-item>
-            <el-form-item label="备注">
-              <el-input v-model="form.remark"></el-input>
-            </el-form-item>
-          </el-form>
-        </div>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="reset">取 消</el-button>
-          <el-button type="primary" @click="onSubmit('form')">{{showType ? '更 新' : '新 增'}}</el-button>
-        </span>
-    </el-dialog>
-
-
-  </div>
-</template>
-
-<script>
-import { areaList, delArea, addArea, editArea } from '../../utils/api.js';
-import { arrToIds } from '../../utils/index.js';
-import QueryConditions from "@/components/bioSafety/QueryConditions";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-export default {
-  name: "AreaAdmin",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter
-  },
-  data() {
-    return {
-      searchList: [
-        {
-          type: 'input',
-          label: '区域搜索:',
-          placeholder: '请输入区域',
-          field: 'keyWord'
-        },
-      ],
-      areaList: [],
-      title: '监控区域列表',
-      tableItems: [
-        {
-          prop: 'id',
-          label: 'ID',
-          minWidth: '50',
-          slotName: 'id'
-        },
-        {
-          prop: 'areaName',
-          label: '区域名称',
-          minWidth: '150',
-          slotName: 'areaName'
-        },
-        {
-          prop: 'publicUrl',
-          label: '绑定IP',
-          minWidth: '150',
-          slotName: 'publicUrl'
-        },
-        {
-          prop: 'remark',
-          label: '备注',
-          minWidth: '150',
-          slotName: 'remark'
-        },
-        {
-          label: '操作',
-          minWidth: '150',
-          slotName: 'handler'
-        }
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: true
-      },
-      pageNum: 1,
-      pageSize: 20,
-      total: 0,
-      keyWord: '',
-      selectList: [],
-      showType: false,
-      dialogVisible: false,
-      rules: {
-        areaName: [ { required: true, message: '区域名称不能为空', trigger: 'blur' } ],
-        publicUrl: [ { required: true, message: 'IP不能为空', trigger: 'blur' } ],
-      },
-      form: {
-        areaName: '',
-        remark: '',
-        publicUrl: '',
-      }
-    }
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum= val;
-      this.init();
-    },
-    init() {
-      let params = {
-        current: this.pageNum,
-        size: this.pageSize,
-        areaName: this.keyWord
-      }
-      areaList(params).then(res => {
-        if(res.code === 10000) {
-          this.areaList = res.data.records;
-          this.total = res.data.total;
-        }
-      })
-    },
-    handleQuery(data) {
-      this.keyWord = data.keyWord ? data.keyWord : '';
-      this.pageNum = 1;
-      this.init()
-    },
-    // 编辑
-    edit(row) {
-      this.showType = true;
-      this.form.areaName = row.areaName;
-      this.form.remark = row.remark;
-      this.form.id = row.id;
-      this.form.publicUrl = row.publicUrl;
-      this.dialogVisible = true;
-    },
-    // 删除
-    del(row) {
-      let params = {
-        ids: row.id
-      }
-      delArea(params).then(res => {
-        if(res.code === 10000) {
-          this.init();
-          this.$message.success(res.message)
-        } else {
-          this.$message.error(res.message)
-        }
-      })
-    },
-    // 批量选择
-    selectionChange(rows) {
-      this.selectList = rows;
-    },
-    // 批量删除
-    delAll() {
-      if(this.selectList.length > 0) {
-        this.$confirm('此操作将永久删除这些区域,是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let ids = arrToIds(this.selectList);
-          let params = {
-            ids: ids
-          }
-          delArea(params).then(res => {
-            if(res.code === 10000) {
-              this.init();
-              this.$message.success(res.message)
-            } else {
-              this.$message.error(res.message)
-            }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });
-        })
-        // delArea()
-      } else {
-        this.$message.error('请勾选需要删除的区域');
-        return;
-      }
-    },
-    reset() {
-      this.dialogVisible = false;
-      this.form ={
-        areaName: '',
-        publicUrl: '',
-        remark: '',
-      }
-      this.showType = false;
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.showType) {
-            // 编辑
-            let params = {
-              id: this.form.id,
-              areaName: this.form.areaName,
-              publicUrl: this.form.publicUrl,
-              remark: this.form.remark
-            }
-            editArea(params).then(res => {
-              this.reset()
-              if(res.code === 10000) {
-                this.init();
-                this.$message.success(res.message)
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          } else {
-            // 新增
-            let params = {
-              areaName: this.form.areaName,
-              publicUrl: this.form.publicUrl,
-              remark: this.form.remark
-            }
-            addArea(params).then(res => {
-              this.reset();
-              if(res.code === 10000) {
-                this.init();
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      })
-    }
-  },
-  mounted() {
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-  .area {
-    width: 100%;
-    height: 100%;
-    box-sizing: border-box;
-    padding: 20px;
-  }
-</style>

+ 0 - 327
src/views/Video/CameraBrand.vue

@@ -1,327 +0,0 @@
-<template>
-  <div class="cameraBrand">
-    <!-- 查询   -->
-    <query-conditions :formItems="searchList" @getQueryParams="handleQuery"></query-conditions>
-    <!--  表格   -->
-    <new-table :height="600" :title="title" :listData="brandLists" :tableItems="tableItems" :shows="tableShows" @selectionChange="selectionChange">
-      <template #right>
-        <div>
-          <el-button size="mini" type="primary"  v-if="hasPerm('brand:add')" @click="dialogVisible = true">添加品牌</el-button>
-
-          <el-button size="mini" type="danger" v-if="hasPerm('brand:del')" @click="delAll">批量删除</el-button>
-
-        </div>
-      </template>
-      <template #streamType="scope">
-        <div>
-          <span v-if="scope.row.streamType === 0">主码流</span>
-          <span v-else>辅码流</span>
-        </div>
-      </template>
-      <template #handler="scope">
-        <el-button size="mini" @click="edit(scope.row)"  v-if="hasPerm('brand:edit')" style="margin-right: 10px">编辑</el-button>
-        <el-popconfirm
-            title=" 确定要删除这个区域吗?"
-            @confirm="del(scope.row)"
-        >
-          <el-button type="danger"  v-if="hasPerm('brand:del')" size="mini" slot="reference">删除</el-button>
-        </el-popconfirm>
-      </template>
-    </new-table>
-    <table-footer
-        :totals="total"
-        :size="pageSize"
-        @sizeChange="sizeChange"
-        @pageChange="pageChange"></table-footer>
-    <!-- 新增编辑   -->
-    <el-dialog
-        :title="showType ? '编 辑' : '新 增'"
-        :visible.sync="dialogVisible"
-        width="30%">
-      <div>
-        <el-form ref="form" :model="form" :rules="rules" label-width="80px" size="mini">
-          <el-form-item label="品牌名称" prop="brandName">
-            <el-input v-model="form.brandName"></el-input>
-          </el-form-item>
-          <el-form-item label="主码流" prop="mainStream">
-            <el-input v-model="form.mainStream"></el-input>
-          </el-form-item>
-          <el-form-item label="副码流" prop="assistStream">
-            <el-input v-model="form.assistStream"></el-input>
-          </el-form-item>
-          <el-form-item label="所用码流" prop="streamType">
-            <el-select v-model="form.streamType">
-              <el-option v-for="item in options" :label="item.name" :value="item.id" :key="item.id"></el-option>
-            </el-select>
-          </el-form-item>
-<!--          <el-form-item label="主码流">-->
-<!--            <el-input v-model="form.mainStream"></el-input>-->
-<!--          </el-form-item>-->
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-          <el-button @click="reset">取 消</el-button>
-          <el-button type="primary" @click="onSubmit('form')">{{showType ? '更 新' : '新 增'}}</el-button>
-        </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "@/components/bioSafety/QueryConditions";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-import {brandList, addBarand, delBarand, editBarand } from '../../utils/api.js';
-import {arrToIds} from "@/utils";
-export default {
-  name: "CameraBrand",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter
-  },
-  data() {
-    return {
-      searchList: [
-        {
-          type: 'input',
-          label: '品牌搜索:',
-          placeholder: '请输入品牌',
-          field: 'keyWord'
-        },
-      ],
-      brandLists: [],
-      title: '摄像头品牌列表',
-      tableItems: [
-        {
-          prop: 'brandName',
-          label: '品牌名称',
-          minWidth: '150',
-          slotName: 'brandName'
-        },
-        {
-          prop: 'mainStream',
-          label: '主码流',
-          minWidth: '150',
-          slotName: 'mainStream'
-        },
-        {
-          prop: 'assistStream',
-          label: '副码流',
-          minWidth: '150',
-          slotName: 'assistStream'
-        },
-        {
-          prop: 'streamType',
-          label: '所用码流',
-          minWidth: '150',
-          slotName: 'streamType'
-        },
-        {
-          label: '操作',
-          minWidth: '150',
-          slotName: 'handler'
-        }
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: true
-      },
-      pageNum: 1,
-      pageSize: 20,
-      total: 0,
-      keyWord: '',
-      form: {
-        brandName: '',
-        mainStream: '',
-        assistStream: '',
-        streamType: 0,
-      },
-      rules: {
-        brandName: [
-          { required: true, message: '品牌名称不能为空', trigger: 'blur' }
-        ],
-        mainStream: [
-          { required: true, message: '主码流不能为空', trigger: 'blur' }
-        ],
-        assistStream: [
-          { required: true, message: '副码流不能为空', trigger: 'blur' }
-        ],
-        streamType: [
-          { required: true, message: '所用码流不能为空', trigger: 'change' }
-        ]
-      },
-      options: [
-        {
-          id: 0,
-          name: '主码流'
-        },
-        {
-          id: 1,
-          name: '辅码流'
-        }
-      ],
-      dialogVisible: false,
-      showType: false,
-      selectList: []
-    }
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum= val;
-      this.init();
-    },
-    handleQuery(data) {
-      this.keyWord = data.keyWord;
-      this.pageNum = 1;
-      this.init()
-    },
-    init() {
-      let params = {
-        current: this.pageNum,
-        size: this.pageSize,
-        brandName: this.keyWord
-      }
-      brandList(params).then(res => {
-        if(res.code === 10000) {
-          this.brandLists = res.data.records;
-          this.total = res.data.total;
-        }
-      })
-    },
-    edit(row) {
-      this.form = {
-        id: row.id,
-        brandName: row.brandName,
-        mainStream: row.mainStream,
-        assistStream: row.assistStream,
-        streamType: row.streamType,
-      }
-      this.dialogVisible = true;
-      this.showType = true;
-    },
-    // 批量选择
-    selectionChange(rows) {
-      this.selectList = rows;
-    },
-    // 批量删除
-    delAll() {
-      if(this.selectList.length > 0) {
-        this.$confirm('此操作将永久删除这些品牌,是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          let ids = arrToIds(this.selectList);
-          let params = {
-            ids: ids
-          }
-          delBarand(params).then(res => {
-            if(res.code === 10000) {
-              this.init();
-              this.$message.success(res.message)
-            } else {
-              this.$message.error(res.message)
-            }
-          })
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });
-        })
-        // delArea()
-      } else {
-        this.$message.error('请勾选需要删除的区域');
-        return;
-      }
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.showType) {
-            // 编辑
-            let params = {
-              id: this.form.id,
-              brandName: this.form.brandName,
-              mainStream: this.form.mainStream,
-              assistStream: this.form.assistStream,
-              streamType: this.form.streamType,
-            }
-            editBarand(params).then(res => {
-              this.reset()
-              if(res.code === 10000) {
-                this.init();
-                this.$message.success(res.message)
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          } else {
-            // 新增
-            let params = {
-              brandName: this.form.brandName,
-              mainStream: this.form.mainStream,
-              assistStream: this.form.assistStream,
-              streamType: this.form.streamType
-            }
-            addBarand(params).then(res => {
-              this.reset();
-              if(res.code === 10000) {
-                this.init();
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message)
-              }
-            })
-          }
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      })
-    },
-    reset() {
-      this.showType = false;
-      this.dialogVisible = false;
-      this.form =  {
-        brandName: '',
-        mainStream: '',
-        assistStream: '',
-        streamType: 0,
-      }
-    },
-    del(row) {
-      let params = {
-        ids: row.id
-      }
-      delBarand(params).then(res =>{
-        if(res.code === 10000) {
-          this.init()
-          this.$message.success(res.message)
-        } else {
-          this.$message.error('删除失败')
-        }
-      })
-    }
-  },
-  mounted() {
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-  .cameraBrand {
-    width: 100%;
-    height: 100%;
-    box-sizing: border-box;
-    padding: 20px;
-  }
-</style>

+ 0 - 633
src/views/Video/VideoAdmin.vue

@@ -1,633 +0,0 @@
-<template>
-  <div class="videoAdmin">
-    <!-- 查询   -->
-    <query-conditions
-      :formItems="searchList"
-      @getQueryParams="handleQuery"
-    ></query-conditions>
-    <!-- 表格   -->
-    <new-table
-      :height="600"
-      :title="title"
-      :listData="videoLists"
-      :tableItems="tableItems"
-      :shows="tableShows"
-      @selectionChange="selectionChange"
-    >
-      <template #right>
-        <el-button
-          size="mini"
-          type="primary"
-          v-if="hasPerm('video:add')"
-          style="margin-right: 10px"
-          @click="add"
-          >添加监控</el-button
-        >
-        <el-button
-          size="mini"
-          type="danger"
-          v-if="hasPerm('video:del')"
-          @click="delAll"
-          >批量删除</el-button
-        >
-      </template>
-      <template #start="scope">
-        <el-switch
-          v-model="scope.row.runStatus"
-          @change="onSwitch(scope.row)"
-        ></el-switch>
-      </template>
-      <template #handler="scope">
-        <el-button
-          size="mini"
-          style="margin-right: 10px"
-          v-if="hasPerm('video:edit')"
-          @click="edit(scope.row)"
-          >编辑</el-button
-        >
-        <el-popconfirm
-          title=" 确定要删除这个区域吗?"
-          @confirm="del(scope.row)"
-        >
-          <el-button
-            type="danger"
-            v-if="hasPerm('video:del')"
-            size="mini"
-            slot="reference"
-            >删除</el-button
-          >
-        </el-popconfirm>
-        <el-button
-          size="mini"
-          type="primary"
-          style="margin-left: 10px"
-          @click="open(scope.row)"
-          >查看摄像头</el-button
-        >
-      </template>
-    </new-table>
-    <table-footer
-      :totals="total"
-      :size="pageSize"
-      @sizeChange="sizeChange"
-      @pageChange="pageChange"
-    ></table-footer>
-    <!-- 新增编辑   -->
-    <el-dialog
-      :title="showType ? '编 辑' : '新 增'"
-      :visible.sync="dialogVisible"
-      width="30%"
-    >
-      <div>
-        <el-form
-          ref="form"
-          :model="form"
-          :rules="rules"
-          label-width="100px"
-          size="mini"
-        >
-          <el-form-item label="摄像头名称" prop="cameraName">
-            <el-input v-model="form.cameraName"></el-input>
-          </el-form-item>
-          <el-form-item label="所属区域" prop="areaId">
-            <el-select v-model="form.areaId">
-              <el-option
-                v-for="item in searchList[0].options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="所属品牌" prop="brandId">
-            <el-select v-model="form.brandId">
-              <el-option
-                v-for="item in searchList[1].options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="ip地址" prop="cameraIp">
-            <el-input v-model="form.cameraIp"></el-input>
-          </el-form-item>
-          <el-form-item label="用户名" prop="account">
-            <el-input v-model="form.account"></el-input>
-          </el-form-item>
-          <el-form-item label="密码" prop="password">
-            <el-input v-model="form.password"></el-input>
-          </el-form-item>
-          <el-form-item label="斯高德房间id">
-            <el-input v-model="form.roomId"></el-input>
-          </el-form-item>
-          <!--          <el-form-item label="排序" prop="sort">-->
-          <!--            <el-input v-model="form.sort"></el-input>-->
-          <!--          </el-form-item>-->
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="reset">重 置</el-button>
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="onSubmit('form')">{{
-          showType ? "更 新" : "新 增"
-        }}</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog :title="cameraTitle" :visible.sync="isVideo" width="50%">
-      <div style="width: 100%; height: 560px; text-align: center;">
-        <iframe
-          v-if="isVideo"
-          :src="
-            'static/jinm/index.html?' +
-              '1' +
-              ',' +
-              cameraOne +
-              ',' +
-              cameraTwo +
-              ',' +
-              '100%' +
-              ',' +
-              '0'
-          "
-          style="width: 100%; height: 530px;"
-          frameborder="0"
-          allowfullscreen="true"
-        ></iframe>
-        <div>
-          <el-button
-            :disabled="last === null"
-            size="small"
-            @click="getNext(last)"
-            >上一个</el-button
-          >
-          <el-button
-            :disabled="next === null"
-            size="small"
-            @click="getNext(next)"
-            >下一个</el-button
-          >
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import QueryConditions from "@/components/bioSafety/QueryConditions";
-import NewTable from "@/components/newTable/NewTable";
-import TableFooter from "@/components/TableFooter";
-import {
-  areaList,
-  brandList,
-  videoList,
-  videoSwitch,
-  delVideo,
-  addVideo,
-  editVideo,
-  getVideo,
-} from "../../utils/api";
-import { arrToIds } from "@/utils";
-export default {
-  name: "VideoAdmin",
-  components: {
-    QueryConditions,
-    NewTable,
-    TableFooter,
-  },
-  data() {
-    return {
-      searchList: [
-        {
-          type: "select",
-          label: "区域搜索:",
-          placeholder: "请选择区域",
-          field: "areaId",
-          options: [],
-        },
-        {
-          type: "select",
-          label: "摄像头品牌:",
-          placeholder: "请选择品牌",
-          field: "brandId",
-          options: [],
-        },
-        // {
-        //   type: 'select',
-        //   label: '摄像头排序:',
-        //   placeholder: '请选择排序',
-        //   field: 'sort',
-        //   options: [
-        //     {
-        //       label: '正序',
-        //       value: 0,
-        //     },
-        //     {
-        //       label: '倒序',
-        //       value: 1
-        //     }
-        //   ]
-        // },
-        {
-          type: "input",
-          label: "名称搜索:",
-          placeholder: "请输入摄像头名称",
-          field: "keyWord",
-        },
-      ],
-      keyWord: "",
-      areaId: "",
-      brandId: "",
-      sort: "",
-      pageNum: 1,
-      pageSize: 20,
-      total: 0,
-      videoLists: [],
-      title: "监控列表",
-      tableItems: [
-        {
-          prop: "id",
-          label: "ID",
-          minWidth: "50",
-          slotName: "id",
-        },
-        {
-          prop: "cameraName",
-          label: "摄像头名称",
-          minWidth: "100",
-          slotName: "cameraName",
-        },
-        {
-          prop: "areaName",
-          label: "所属区域",
-          minWidth: "100",
-          slotName: "areaName",
-        },
-        {
-          prop: "brandName",
-          label: "所属品牌",
-          minWidth: "100",
-          slotName: "brandName",
-        },
-        {
-          prop: "cameraIp",
-          label: "ip地址",
-          minWidth: "100",
-          slotName: "cameraIp",
-        },
-        {
-          prop: "account",
-          label: "用户名",
-          minWidth: "100",
-          slotName: "account",
-        },
-        {
-          prop: "password",
-          label: "密码",
-          minWidth: "100",
-          slotName: "password",
-        },
-        // {
-        //   prop: 'sort',
-        //   label: '排序',
-        //   minWidth: '50',
-        //   slotName: 'sort'
-        // },
-        {
-          label: "是否启用",
-          minWidth: "80",
-          slotName: "start",
-        },
-        {
-          label: "操作",
-          minWidth: "150",
-          slotName: "handler",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: true,
-      },
-      dialogVisible: false,
-      showType: false,
-      form: {
-        cameraName: "",
-        areaId: 26,
-        brandId: 2,
-        cameraIp: "",
-        account: "admin",
-        password: "a12345678",
-        sort: "",
-        roomId: "",
-      },
-      rules: {
-        cameraName: [
-          { required: true, message: "摄像头名称不能为空", trigger: "blur" },
-        ],
-        areaId: [
-          { required: true, message: "区域不能为空", trigger: "change" },
-        ],
-        brandId: [
-          { required: true, message: "品牌不能为空", trigger: "change" },
-        ],
-        cameraIp: [
-          { required: true, message: "ip地址不能为空", trigger: "blur" },
-        ],
-        account: [
-          { required: true, message: "用户名不能为空", trigger: "blur" },
-        ],
-        password: [
-          { required: true, message: "密码不能为空", trigger: "blur" },
-        ],
-        sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
-      },
-      selectList: [],
-      cameraOne: "",
-      cameraTwo: "",
-      cameraTitle: "",
-      isVideo: false,
-      last: "",
-      next: "",
-    };
-  },
-  methods: {
-    // 修改size
-    sizeChange(val) {
-      this.pageSize = val;
-      this.init();
-    },
-    // 修改页数
-    pageChange(val) {
-      this.pageNum = val;
-      this.init();
-    },
-    init() {
-      let params = {
-        current: this.pageNum,
-        size: this.pageSize,
-        areaId: this.areaId,
-        brandId: this.brandId,
-        strchStr: this.keyWord,
-        // sort: this.sort
-      };
-      videoList(params).then((res) => {
-        if (res.code === 10000) {
-          this.videoLists = res.data.records;
-          this.total = res.data.total;
-        }
-      });
-    },
-    handleQuery(data) {
-      this.areaId = data.areaId ? data.areaId : "";
-      this.keyWord = data.keyWord ? data.keyWord : "";
-      this.brandId = data.brandId ? data.brandId : "";
-      this.sort = data.sort;
-      this.pageNum = 1;
-      this.init();
-    },
-    // 获取区域,摄像头品牌
-    getArea() {
-      let params = {
-        current: 1,
-        size: 100,
-        areaName: "",
-      };
-      areaList(params).then((res) => {
-        if (res.code === 10000) {
-          res.data.records.forEach((item) => {
-            this.searchList[0].options.push({
-              label: item.areaName,
-              value: item.id,
-            });
-          });
-        }
-      });
-      let params1 = {
-        current: 1,
-        size: 100,
-        brandName: "",
-      };
-      brandList(params1).then((res) => {
-        if (res.code === 10000) {
-          res.data.records.forEach((item) => {
-            this.searchList[1].options.push({
-              label: item.brandName,
-              value: item.id,
-            });
-          });
-        }
-      });
-    },
-    // 是否启用
-    onSwitch(row) {
-      let params = {
-        id: row.id,
-      };
-      videoSwitch(params).then((res) => {
-        if (res.code === 10000) {
-          this.$message.success(res.message);
-        } else {
-          this.$message.error("失败");
-        }
-      });
-    },
-    // 批量选择
-    selectionChange(rows) {
-      this.selectList = rows;
-    },
-    add() {
-      this.showType = false;
-      this.dialogVisible = true;
-    },
-    // 编辑
-    edit(row) {
-      this.showType = true;
-      this.dialogVisible = true;
-      this.form.id = row.id;
-      this.form.cameraName = row.cameraName;
-      this.form.areaId = row.areaId;
-      this.form.brandId = row.brandId;
-      this.form.cameraIp = row.cameraIp;
-      this.form.account = row.account;
-      this.form.password = row.password;
-      this.form.roomId = row.roomId;
-      // this.form.sort = row.sort;
-    },
-    // 单个删除
-    del(row) {
-      let params = {
-        ids: row.id,
-      };
-      delVideo(params).then((res) => {
-        if (res.code === 10000) {
-          this.init();
-          this.$message.success(res.message);
-        } else {
-          this.$message("删除失败");
-        }
-      });
-    },
-    // 批量删除
-    delAll() {
-      if (this.selectList.length > 0) {
-        this.$confirm("此操作将永久删除这些品牌,是否继续?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        })
-          .then(() => {
-            let ids = arrToIds(this.selectList);
-            let params = {
-              ids: ids,
-            };
-            delVideo(params).then((res) => {
-              if (res.code === 10000) {
-                this.init();
-                this.$message.success(res.message);
-              } else {
-                this.$message.error("删除失败");
-              }
-            });
-          })
-          .catch(() => {
-            this.$message({
-              type: "info",
-              message: "已取消删除",
-            });
-          });
-        // delArea()
-      } else {
-        this.$message.error("请勾选需要删除的区域");
-        return;
-      }
-    },
-    // 查看摄像头
-    open(row) {
-      if (row.runStatus) {
-        let params = {
-          cameraIds: [row.id],
-          strchStr: this.keyWord,
-          areaId: this.areaId,
-          brandId: this.brandId,
-          // sort: this.sort
-        };
-        getVideo(params).then((res) => {
-          if (res.code === 10000) {
-            this.isVideo = true;
-            this.cameraOne = res.data[0].wsUrl;
-            this.cameraTwo = res.data[0].rtspUrl;
-            this.last = res.data[0].lastId;
-            this.next = res.data[0].nextId;
-            this.cameraTitle = res.data[0].cameraName;
-          } else {
-            this.$message.error(res.message);
-          }
-        });
-      } else {
-        this.$message.error("该摄像头未启用");
-      }
-    },
-    // 新增、编辑
-    onSubmit(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.showType) {
-            // // 编辑
-            let params = {
-              id: this.form.id,
-              cameraName: this.form.cameraName,
-              areaId: this.form.areaId,
-              brandId: this.form.brandId,
-              cameraIp: this.form.cameraIp,
-              account: this.form.account,
-              password: this.form.password,
-              roomId: this.form.roomId,
-              // sort: this.form.sort
-            };
-            editVideo(params).then((res) => {
-              this.dialogVisible = false;
-              if (res.code === 10000) {
-                this.init();
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message);
-              }
-            });
-          } else {
-            // 新增
-            let params = {
-              cameraName: this.form.cameraName,
-              areaId: this.form.areaId,
-              brandId: this.form.brandId,
-              cameraIp: this.form.cameraIp,
-              account: this.form.account,
-              password: this.form.password,
-              roomId: this.form.roomId,
-              // sort: this.form.sort
-            };
-            addVideo(params).then((res) => {
-              this.dialogVisible = false;
-              if (res.code === 10000) {
-                this.init();
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message);
-              }
-            });
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    // 重置
-    reset() {
-      this.form = {
-        cameraName: "",
-        areaId: "",
-        brandId: "",
-        cameraIp: "",
-        account: "",
-        password: "",
-        roomId: "",
-      };
-    },
-    // 上一个下一个
-    getNext(id) {
-      let params = {
-        cameraIds: [id],
-        strchStr: this.keyWord,
-        areaId: this.areaId,
-        brandId: this.brandId,
-        sort: this.sort,
-      };
-      getVideo(params).then((res) => {
-        if (res.code === 10000) {
-          this.isVideo = true;
-          this.cameraTitle = res.data[0].cameraName;
-          this.cameraOne = res.data[0].wsUrl;
-          this.cameraTwo = res.data[0].rtspUrl;
-          this.last = res.data[0].lastId;
-          this.next = res.data[0].nextId;
-        } else {
-          this.$message.error(res.message);
-        }
-      });
-    },
-  },
-  mounted() {
-    this.getArea();
-    this.init();
-  },
-};
-</script>
-
-<style scoped>
-.videoAdmin {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px;
-}
-</style>

+ 0 - 297
src/views/Video/VideoLook.vue

@@ -1,297 +0,0 @@
-<template>
-  <div>
-    <new-table
-        :height="600"
-        :title="title"
-        :listData="videoLists"
-        :tableItems="tableItems"
-        :shows="tableShows"
-    >
-      <template #right>
-        <el-button
-            size="mini"
-            type="primary"
-            style="margin-right: 10px"
-            @click="add"
-        >添加监控</el-button>
-      </template>
-      <template #type="scope">
-       <span>{{getType(scope.row.type)}}</span>
-      </template>
-      <template #handler="scope">
-        <el-button
-            size="mini"
-            style="margin-right: 10px"
-            @click="edit(scope.row)"
-        >编辑</el-button
-        >
-        <el-popconfirm
-            title=" 确定要删除这个区域吗?"
-            @confirm="del(scope.row)"
-        >
-          <el-button
-              type="danger"
-              size="mini"
-              slot="reference"
-          >删除</el-button
-          >
-        </el-popconfirm>
-        <el-button
-            size="mini"
-            type="primary"
-            style="margin-left: 10px"
-            @click="open(scope.row)"
-        >查看摄像头</el-button
-        >
-      </template>
-    </new-table>
-    <!-- 新增编辑   -->
-    <el-dialog
-        :title="showType ? '编 辑' : '新 增'"
-        :visible.sync="dialogVisible"
-        width="30%"
-    >
-      <div>
-        <el-form
-            ref="form"
-            :model="form"
-            :rules="rules"
-            label-width="120px"
-            size="mini"
-        >
-          <el-form-item label="大屏所属位置" prop="type">
-            <el-select v-model="form.type">
-              <el-option v-for="item in typeList" :key="item.id" :value="item.id" :label="item.name"></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="选择监控" prop="selectVideo">
-            <el-cascader
-                v-model="selectVideo"
-                :options="options"
-                size="mini"
-                @change="handleChange"
-                :props="{value: 'id', label: 'cameraName', children: 'cameraList', expandTrigger: 'hover', disabled: 'runStatus'}"
-                :show-all-levels="false"></el-cascader>
-          </el-form-item>
-        </el-form>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="reset">重 置</el-button>
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="onSubmit('form')">{{
-            showType ? "更 新" : "新 增"
-          }}</el-button>
-      </span>
-    </el-dialog>
-    <el-dialog :title="cameraTitle" :visible.sync="isVideo" width="50%">
-      <div style="width: 100%; height: 560px; text-align: center;">
-        <iframe
-            v-if="isVideo"
-            :src="
-            'static/jinm/index.html?' +
-              '1' +
-              ',' +
-              cameraOne +
-              ',' +
-              cameraTwo +
-              ',' +
-              '100%' +
-              ',' +
-              '0'
-          "
-            style="width: 100%; height: 530px;"
-            frameborder="0"
-            allowfullscreen="true"
-        ></iframe>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import NewTable from "../../components/newTable/NewTable";
-import {getVideoAll, baseVideoAdd, baseVideoList, baseVideoDel, baseVideoEdit, getVideo} from "../../utils/api";
-export default {
-  name: "VideoLook",
-  components: {
-    NewTable
-  },
-  data() {
-    return {
-      title: '视频列表',
-      tableItems: [
-        {
-          prop: "id",
-          label: "ID",
-          minWidth: "50",
-          slotName: "id",
-        },
-        {
-          prop: "videoName",
-          label: "摄像头名称",
-          minWidth: "100",
-          slotName: "videoName",
-        },
-        {
-          label: "所属大屏位置",
-          minWidth: "100",
-          slotName: "type",
-        },
-        {
-          label: "操作",
-          minWidth: "150",
-          slotName: "handler",
-        },
-      ],
-      tableShows: {
-        showIndex: false,
-        showSelect: false,
-      },
-      videoLists: [],
-      typeList: [
-        {
-          id: 1,
-          name: '门卫管控'
-        },
-        {
-          id: 2,
-          name: '环境监测'
-        }
-      ],
-      showType: false,
-      dialogVisible: false,
-      form: {
-        videoId: '',
-        type: ''
-      },
-      options: [],
-      selectVideo: [],
-      rules: {
-        type: [{ required: true, message: '请选择位置', trigger: 'change' }],
-      },
-      cameraTitle: '',
-      isVideo: false,
-      cameraOne: '',
-      cameraTwo: '',
-    }
-  },
-  methods: {
-    init() {
-      baseVideoList({}).then(res => {
-        if(res.code === 10000) {
-          this.videoLists = res.data;
-        }
-      })
-    },
-    initVideo() {
-      getVideoAll({}).then(res => {
-        if(res.code === 10000) {
-          res.data.forEach(item => {
-            item.cameraList.forEach(items => {
-              items.runStatus = !items.runStatus
-            })
-          })
-          this.options = res.data;
-        }
-      })
-    },
-    getType(val) {
-      let str = '';
-      this.typeList.forEach(item => {
-        if(item.id === val) {
-          str = item.name
-        }
-      })
-      return str
-    },
-    add() {
-      this.dialogVisible = true;
-      this.showType = false;
-    },
-    edit(row) {
-      this.dialogVisible = true;
-      this.showType = true;
-      this.form.id = row.id;
-      this.form.type = row.type;
-      this.form.videoId = row.videoId;
-      let arr = row.selectVideo.split(',');
-      this.selectVideo = arr.map(Number);
-    },
-    del(val) {
-      let params = {
-        id: val.id
-      }
-      baseVideoDel(params).then(res => {
-        if(res.code === 10000) {
-          this.init()
-          this.$message.success(res.message);
-        } else {
-          this.$message.error(res.message);
-        }
-      })
-    },
-    open(row) {
-      let params = {
-        cameraIds: [row.videoId]
-      }
-      getVideo(params).then(res => {
-        this.isVideo = true;
-        this.cameraOne = res.data[0].wsUrl;
-        this.cameraTwo = res.data[0].rtspUrl;
-      })
-    },
-    handleChange(value) {
-       this.form.videoId = value[value.length - 1];
-    },
-    onSubmit(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          if (this.showType) {
-            let params = {
-              id: this.form.id,
-              videoId: this.form.videoId,
-              type: this.form.type,
-              selectVideo: this.selectVideo.join(',')
-            }
-            baseVideoEdit(params).then(res => {
-              if(res.code === 10000) {
-                this.init()
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message);
-              }
-              this.dialogVisible = false;
-            })
-          } else {
-            let params = {
-              videoId: this.form.videoId,
-              type: this.form.type,
-              selectVideo: this.selectVideo.join(',')
-            }
-            baseVideoAdd(params).then(res => {
-              if(res.code === 10000) {
-                this.init()
-                this.$message.success(res.message);
-              } else {
-                this.$message.error(res.message);
-              }
-              this.dialogVisible = false;
-            })
-          }
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-  },
-  mounted() {
-    this.initVideo();
-    this.init();
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 186
src/views/Zoology/Sewage.vue

@@ -1,186 +0,0 @@
-<template>
-  <div class="sewage">
-    <div class="reply" :style="{ color: color }">污水监测</div>
-    <div class="sewage-box">
-      <div class="box" v-for="item in echartList" :key="item.id">
-        <chart-sewage-corona :config-obj="item"></chart-sewage-corona>
-      </div>
-    </div>
-    <br />
-    <div class="echarts-line">
-      <div class="reply1" :style="{ color: color }">污水监测</div>
-      <div class="echarts-box" v-for="item in lineList" :key="item.id">
-        <template v-if="item.data.length > 0">
-          <chart-sewage-line :line-config="item"></chart-sewage-line>
-        </template>
-        <template v-else>
-          <el-empty description="设备暂无数据"></el-empty>
-        </template>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script>
-import ChartSewageCorona from "@/views/Zoology/chart/ChartSewageCorona";
-import ChartSewageLine from "@/views/Zoology/chart/ChartSewageLine";
-import { mapState } from "vuex";
-import { getEnvList, getSevenEnv } from "../../utils/api";
-
-export default {
-  name: "Sewage",
-  components: {
-    ChartSewageCorona,
-    ChartSewageLine,
-  },
-  computed: {
-    ...mapState(["color"]),
-  },
-  data() {
-    return {
-      echartList: [
-        {
-          id: 1,
-          data: 0,
-          unit: "",
-          max: 14,
-          name: "ph",
-        },
-        {
-          id: 2,
-          data: 0,
-          unit: "mg/L",
-          max: 500,
-          name: "COD",
-        },
-        {
-          id: 3,
-          data: 0,
-          unit: "mg/L",
-          max: 200,
-          name: "总磷",
-        },
-        {
-          id: 4,
-          data: 0,
-          unit: "mg/L",
-          max: 2,
-          name: "氨氮量",
-        },
-        {
-          id: 5,
-          data: 0,
-          unit: "L/s",
-          max: 1,
-          name: "污水流量",
-        },
-      ],
-      lineList: [
-        {
-          id: 1,
-          unit: "",
-          time: [],
-          data: [],
-          name: "ph",
-        },
-        {
-          id: 2,
-          unit: "mg/L",
-          time: [],
-          data: [],
-          name: "COD",
-        },
-        {
-          id: 3,
-          unit: "T",
-          time: [],
-          data: [],
-          name: "流量",
-        },
-        {
-          id: 4,
-          unit: "mg/L",
-          time: [],
-          data: [],
-          name: "氨氮量",
-        },
-      ],
-    };
-  },
-  methods: {
-    init() {
-      getEnvList({}).then((res) => {
-        if (res.code === 10000) {
-          this.echartList[0].data = res.data.phPj;
-          this.echartList[1].data = res.data.hxxylPj;
-          this.echartList[3].data = res.data.adPj;
-          this.echartList[4].data = res.data.wsPj;
-        }
-      });
-      getSevenEnv({ days: 7 }).then((res) => {
-        if (res.code === 10000) {
-          this.lineList.forEach((item) => {
-            item.time = res.data.date;
-          });
-          this.lineList[0].data = res.data.ph;
-          this.lineList[1].data = res.data.cod;
-          this.lineList[2].data = res.data.ws;
-          this.lineList[3].data = res.data.ad;
-        }
-      });
-    },
-  },
-  mounted() {
-    this.init();
-  },
-};
-</script>
-
-<style scoped>
-.sewage {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 20px 20px 0 20px;
-}
-.reply {
-  width: 100%;
-  border: 1px solid #ddd;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-.sewage-box {
-  width: 100%;
-  height: 300px;
-  display: flex;
-  justify-content: space-between;
-  border: 1px solid #ddd;
-  border-top: 0;
-}
-.box {
-  width: 19%;
-  height: 100%;
-}
-.echarts-line {
-  width: 100%;
-  border: 1px solid #ddd;
-}
-.reply1 {
-  width: 100%;
-  height: 50px;
-  background-color: #f3f3f3;
-  line-height: 50px;
-  font-size: 18px;
-  box-sizing: border-box;
-  padding-left: 20px;
-}
-.echarts-box {
-  width: 100%;
-  height: 400px;
-  border-top: 1px solid #ddd;
-}
-</style>

Разница между файлами не показана из-за своего большого размера
+ 0 - 256
src/views/Zoology/chart/ChartSewageCorona.vue


+ 0 - 162
src/views/Zoology/chart/ChartSewageLine.vue

@@ -1,162 +0,0 @@
-<template>
-  <div :id="'chart-sewage-line-' + lineConfig.id" style="width: 100%; height: 100%"></div>
-</template>
-
-<script>
-import { mapState } from 'vuex'
-export default {
-  name: "ChartSewageLine",
-  computed: {
-    ...mapState(['color'])
-  },
-  props: {
-    lineConfig: {
-      type: Object,
-      default: function () {
-        return {
-          id: 0,
-          time: [],
-          data: [],
-          name: '默认',
-          unit: '%'
-        }
-      }
-    }
-  },
-  watch: {
-    color(newVal) {
-      if(newVal) {
-        this.myChart.clear();
-        this.init()
-      }
-    }
-  },
-  data() {
-    return {
-      myChart: null
-    }
-  },
-  methods: {
-    init() {
-      // 时间
-      let dataAxis = this.lineConfig.time;
-      let start = dataAxis.length - 12;
-      let end = dataAxis.length - 1;
-      // 数据
-      let data = this.lineConfig.data;
-      // 单位
-      let unit = this.lineConfig.unit;
-      // 名称
-      let name = this.lineConfig.name;
-      let options = {
-        title: {
-          text: name,
-          top: "5%",
-          left: '2%',
-          textStyle: {
-            color: this.color,
-            fontSize: 16,
-            fontWeight: 300,
-          },
-          padding: 5,
-        },
-        tooltip: {
-          trigger: 'axis',
-        },
-        color: [this.color],
-        dataZoom: [{
-          type: 'inside',
-          startValue: start,
-          endValue: end,
-          show: false
-          // zoomOnMouseWheel: false,
-          // zoomLock: true,
-        }],
-        // dataZoom: [
-        //
-        //   {
-        //     type: 'slider',
-        //     startValue: start,
-        //     endValue:end,
-        //     zoomOnMouseWheel: false,
-        //     zoomLock: true,
-        //   },
-        //   {
-        //     type: 'inside'
-        //   },
-        // ],
-        xAxis: [
-          {
-            type: 'category',
-            data: dataAxis,
-            axisPointer: {
-              type: 'shadow'
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: '近7天统计',
-            axisLabel: {
-              formatter: `{value}${unit}`
-            },
-            axisLine: {
-              show: false,
-              lineStyle: {
-                color: '#6e7079',
-              }
-            },
-            axisTick:{
-              show:false
-            },
-          }
-        ],
-        series: [
-          {
-            name: name,
-            type: 'line',
-            // stack: 'Total',
-            smooth: true,
-            areaStyle: {},
-            emphasis: {
-              focus: 'series'
-            },
-            itemStyle : {
-              color: this.color,
-              borderColor: this.color,
-              normal: {
-                label : {
-                  show: true,
-                  textStyle: {
-                    fontSize: 14
-                  }
-                }
-              }
-            },
-            data: data
-          }
-        ]
-      }
-      this.myChart.setOption(options)
-    }
-  },
-  mounted() {
-    this.myChart = this.$echarts.init(document.getElementById('chart-sewage-line-' + this.lineConfig.id));
-    this.init()
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 166 - 0
src/views/basic-data/archives-admin/ArchivesAdmin.vue

@@ -0,0 +1,166 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 10:36:06
+ * @LastEditTime: 2022-01-08 18:06:57
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\basic-data\archives-admin\ArchivesAdmin.vue
+-->
+<template>
+  <div class="individual-data">
+    <search-cpn v-bind="searchConfig" @handleSearch="handleSearchEvent">
+      <!-- 位置 -->
+      <template #location="scope">
+        <el-cascader
+          :options="options"
+          v-model="searchForm2.location"
+          @change="getlocation"
+          :placeholder="scope.item.placeholder"
+          style="width: 100%"
+        >
+        </el-cascader>
+      </template>
+    </search-cpn>
+
+    <table-cpn v-bind="tableConfig" @handleAddOrEdit="handleAddOrEditEvent">
+      <!-- 类型 -->
+      <template #type="scope">
+        {{ types[scope.row.type - 1] }}
+      </template>
+
+      <!-- 位置 -->
+      <template #location="scope">
+        <span v-location="{ data: scope.row.location }"></span>
+      </template>
+    </table-cpn>
+
+    <modal-cpn ref="modal" v-bind="modalConfig" :otherParams="modalForm2">
+      <!-- 位置 -->
+      <template #location="scope">
+        <el-cascader
+          :options="options"
+          :value="location"
+          @change="submitLocation"
+          :placeholder="scope.item.placeholder"
+          style="width: 100%"
+        >
+        </el-cascader>
+      </template>
+    </modal-cpn>
+  </div>
+</template>
+<script>
+// 搜索
+import SearchCpn from "@/components/search-cpn";
+import { formItemProp } from "./config/search.config";
+import { regionData, CodeToText, TextToCode } from "element-china-area-data";
+
+// 表格
+import TableCpn from "@/components/table-cpn";
+import { propList } from "./config/table.config";
+
+// 新增 or 编辑
+import ModalCpn from "@/components/modal-cpn";
+import { modalItemProp } from "./config/modal.config";
+
+import {
+  baseFarmList,
+  baseFarmAdd,
+  baseFarmEdit,
+  baseFarmDel,
+} from "@/utils/chenApi.js";
+
+export default {
+  components: {
+    SearchCpn,
+    TableCpn,
+    ModalCpn,
+  },
+  data() {
+    return {
+      // 搜索
+      searchConfig: {},
+      searchForm1: {
+        farmName: "",
+        type: "",
+      },
+      searchForm2: {
+        location: [],
+      },
+      options: regionData,
+      // 表格
+      tableConfig: {},
+      tableDataList: [],
+      types: ["屠宰企业", "养殖企业", "检疫机构"],
+      // 新增 or 编辑
+      modalConfig: {},
+      modalForm1: {
+        farmName: "",
+        type: "",
+      },
+      location: [],
+      modalForm2: {
+        location: "",
+      },
+    };
+  },
+  created() {
+    this.searchConfig = { formItemProp, searchForm: this.searchForm1 };
+    this.tableConfig = {
+      propList,
+      permission: "archivesAdmin",
+      requests: {
+        list: baseFarmList,
+        del: baseFarmDel,
+      },
+    };
+    this.modalConfig = {
+      modalItemProp,
+      modalForm: this.modalForm1,
+      requests: {
+        add: baseFarmAdd,
+        edit: baseFarmEdit,
+      },
+    };
+  },
+  methods: {
+    // 查询按钮 - 获取参数
+    handleSearchEvent(params) {
+      console.log("点击了查询按钮,获得的参数", {
+        ...params,
+        ...this.searchForm2,
+      });
+    },
+    // 地点
+    getlocation(val) {
+      console.log(val);
+    },
+    // 模态框的 位置
+    submitLocation(val) {
+      this.modalForm2.location = val.join();
+    },
+    // 新增 or 编辑事件
+    handleAddOrEditEvent(row) {
+      this.$refs["modal"].init(row);
+      if (row.id) {
+        this.location = row.location.split(",");
+        this.modalForm2.location = row.location;
+      } else {
+        this.location = [];
+        this.modalForm2.location = "";
+      }
+    },
+  },
+  watch: {
+    "searchForm2.location": {
+      handler(newVal) {
+        if (typeof newVal === "object") {
+          this.searchForm2.location = newVal.join();
+        }
+      },
+      deep: true,
+    },
+  },
+};
+</script>
+<style scoped></style>

+ 43 - 0
src/views/basic-data/archives-admin/config/modal.config.js

@@ -0,0 +1,43 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-08 16:08:30
+ * @LastEditTime: 2022-01-08 16:09:37
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\basic-data\archives-admin\config\modal.config.js
+ */
+export const modalItemProp = [
+  {
+    label: '牧场名称:',
+    type: 'input',
+    field: 'farmName',
+    placeholder: '请输入牧场名称',
+  },
+  {
+    label: '位置:',
+    type: 'custom',
+    field: 'location',
+    slotName: 'location',
+    placeholder: '请选择位置'
+  },
+  {
+    label: '企业类型:',
+    type: 'select',
+    field: 'type',
+    placeholder: '请选择企业类型',
+    options: [
+      {
+        label: '屠宰企业',
+        value: 1
+      },
+      {
+        label: '养殖企业',
+        value: 2
+      },
+      {
+        label: '检疫机构',
+        value: 3
+      }
+    ]
+  },
+]

+ 43 - 0
src/views/basic-data/archives-admin/config/search.config.js

@@ -0,0 +1,43 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-06 14:44:20
+ * @LastEditTime: 2022-01-08 17:22:08
+ * @LastEditors: Please set LastEditors
+ * @Description: 养殖企业 - 搜索配置
+ * @FilePath: \goldenPig\src\views\summary-data\individual-data\search.config.js
+ */
+export const formItemProp = [
+  {
+    label: '牧场名称:',
+    type: 'input',
+    field: 'farmName',
+    placeholder: '请输入牧场名称',
+  },
+  {
+    label: '位置:',
+    type: 'custom',
+    field: 'location',
+    slotName: 'location',
+    placeholder: '请选择位置'
+  },
+  {
+    label: '企业类型:',
+    type: 'select',
+    field: 'type',
+    placeholder: '请选择企业类型',
+    options: [
+      {
+        label: '屠宰企业',
+        value: 1
+      },
+      {
+        label: '养殖企业',
+        value: 2
+      },
+      {
+        label: '检疫机构',
+        value: 3
+      }
+    ]
+  },
+]

+ 36 - 0
src/views/basic-data/archives-admin/config/table.config.js

@@ -0,0 +1,36 @@
+/*
+ * @Author: your name
+ * @Date: 2022-01-07 14:43:27
+ * @LastEditTime: 2022-01-08 18:26:45
+ * @LastEditors: Please set LastEditors
+ * @Description: 养殖企业 - 表格配置
+ * @FilePath: \goldenPig\src\views\summary-data\individual-data\config\table.config.js
+ */
+export const propList = [
+  {
+    label: '名称',
+    width: '120px',
+    prop: 'farmName',
+    slotName: 'farmName'
+  },
+  {
+    label: '类型',
+    prop: 'type',
+    slotName: 'type'
+  },
+  {
+    label: '位置',
+    prop: 'location',
+    slotName: 'location'
+  },
+  {
+    label: '创建时间',
+    prop: 'createTime',
+    slotName: 'createTime'
+  },
+  {
+    label: '操作',
+    slotName: 'handler',
+    width: '200px'
+  }
+]

+ 17 - 0
src/views/basic-data/device-admin/DeviceAdmin.vue

@@ -0,0 +1,17 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 10:37:10
+ * @LastEditTime: 2022-01-08 10:37:11
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\basic-data\device-admin\DeviceAdmin.vue
+-->
+<template>
+  <div>
+    设备管理
+  </div>
+</template>
+<script>
+export default {};
+</script>
+<style scoped></style>

+ 17 - 0
src/views/basic-data/house-admin/HouseAdmin.vue

@@ -0,0 +1,17 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 10:36:43
+ * @LastEditTime: 2022-01-08 10:36:43
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\basic-data\house-admin\HouseAdmin.vue
+-->
+<template>
+  <div>
+    栋舍管理
+  </div>
+</template>
+<script>
+export default {};
+</script>
+<style scoped></style>

+ 1 - 90
src/views/dashboard/dashboard.vue

@@ -191,69 +191,6 @@
           >详情</el-button
         >
       </div>
-      <div class="pen-flex">
-        <div class="pen-left">
-          <div class="water">
-            <p>本月累计销售额</p>
-            <p>{{ monthSales }}元</p>
-          </div>
-          <div class="water">
-            <p>本月累计销售量</p>
-            <p>{{ monthAmount }}头</p>
-          </div>
-          <div class="water">
-            <p>上月销售总量</p>
-            <p>{{ weekSales }}元</p>
-            <p>
-              <i
-                v-if="Number(weekSalesChange) > 0"
-                class="el-icon-caret-top"
-                style="color: red"
-              ></i>
-              <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
-              <span
-                :style="{
-                  color: Number(weekSalesChange) > 0 ? 'red' : '#1ABC9C',
-                }"
-                >{{ weekSalesChange }}%</span
-              >
-              &nbsp;
-              <span style="font-size: 16px; color: #CFDBED">环比上月</span>
-            </p>
-          </div>
-          <div class="water">
-            <p>上月销售量</p>
-            <p>{{ weekSalesVolume }}头</p>
-            <p>
-              <i
-                v-if="Number(weekSalesVolumeChange) > 0"
-                class="el-icon-caret-top"
-                style="color: red"
-              ></i>
-              <i v-else class="el-icon-caret-bottom" style="color: #1ABC9C"></i>
-              <span
-                :style="{
-                  color: Number(weekSalesVolumeChange) > 0 ? 'red' : '#1ABC9C',
-                }"
-                >{{ weekSalesVolumeChange }}%</span
-              >
-              &nbsp;
-              <span style="font-size: 16px; color: #CFDBED">环比上月</span>
-            </p>
-          </div>
-        </div>
-        <div style="width: 85%; height: 400px">
-          <chart-pig
-            v-if="salesChartData.quantityList.length > 0"
-            :data="salesChartData"
-          ></chart-pig>
-          <el-empty
-            v-else
-            description="暂无数据"
-            style="width: 100%;"
-          ></el-empty>
-        </div>
-      </div>
     </div>
   </div>
 </template>
@@ -274,7 +211,6 @@ import {
   getUid,
 } from "../../utils/api";
 import { timeDate } from "../../utils";
-import { getTheSales } from "../../utils/chenApi";
 import axios from "axios";
 export default {
   name: "dashboard",
@@ -421,17 +357,6 @@ export default {
       weekWeekPercent: 0,
       monthWater: 0,
       monthWeekPercent: 0,
-      monthSales: 0,
-      monthAmount: 0,
-      weekSales: 0,
-      weekSalesChange: 0,
-      weekSalesVolume: 0,
-      weekSalesVolumeChange: 0,
-      salesChartData: {
-        quantityList: [],
-        timeList: [],
-        moneyList: [],
-      },
       loading: false,
       tempLoading: false,
       waterLoading: false,
@@ -613,10 +538,9 @@ export default {
           getListClientHome({}),
           getByRoom({ type: 2 }),
           getListWater({ type: 2 }),
-          getTheSales({ type: 2 }),
         ])
         .then(
-          axios.spread(function(res1, res2, res3, res4) {
+          axios.spread(function(res1, res2, res3) {
             that.loading = false;
             that.tempLoading = false;
             that.waterLoading = false;
@@ -640,19 +564,6 @@ export default {
               that.monthWater = res3.data.monthWater;
               that.monthWeekPercent = res3.data.monthWeekPercent;
             }
-            if (res4.code === 10000) {
-              that.monthSales = res4.data.nowMoney.toLocaleString();
-              that.monthAmount = res4.data.nowQuantity.toLocaleString();
-              that.weekSales = res4.data.money;
-              that.weekSalesChange = res4.data.moneyPercent;
-              that.weekSalesVolume = res4.data.quantity;
-              that.weekSalesVolumeChange = res4.data.quantityPercent;
-              that.salesChartData = {
-                moneyList: res4.data.moneyList,
-                quantityList: res4.data.quantityList,
-                timeList: res4.data.timeList,
-              };
-            }
           })
         );
     },

+ 17 - 0
src/views/eartag-admin/analysis-res/AnalysisRes.vue

@@ -0,0 +1,17 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 10:33:27
+ * @LastEditTime: 2022-01-08 10:33:27
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\eartag-admin\analysis-res\AnalysisRes.vue
+-->
+<template>
+  <div>
+    分析统计
+  </div>
+</template>
+<script>
+export default {};
+</script>
+<style scoped></style>

+ 17 - 0
src/views/eartag-admin/device-status/DeviceStatus.vue

@@ -0,0 +1,17 @@
+<!--
+ * @Author: your name
+ * @Date: 2022-01-08 10:32:10
+ * @LastEditTime: 2022-01-08 10:32:11
+ * @LastEditors: Please set LastEditors
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\eartag-admin\device-status\DeviceStatus.vue
+-->
+<template>
+  <div>
+    设备查看
+  </div>
+</template>
+<script>
+export default {};
+</script>
+<style scoped></style>

+ 14 - 4
src/views/summary-data/individual-data/IndividualData.vue

@@ -1,10 +1,10 @@
 <!--
  * @Author: your name
- * @Date: 2022-01-06 13:37:14
- * @LastEditTime: 2022-01-06 19:38:06
+ * @Date: 2022-01-08 10:32:53
+ * @LastEditTime: 2022-01-08 14:35:06
  * @LastEditors: Please set LastEditors
- * @Description: 汇总数据 - 个体数据页面
- * @FilePath: \goldenPig\src\views\SummaryData\IndividualData.vue
+ * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ * @FilePath: \goldenPig\src\views\eartag-admin\eartag-data\EartagData.vue
 -->
 <template>
   <div class="individual-data">
@@ -54,15 +54,23 @@
         ></el-input>
       </template>
     </search-cpn>
+
+    <table-cpn v-bind="tableConfig"></table-cpn>
   </div>
 </template>
 <script>
 // 搜索
 import SearchCpn from "@/components/search-cpn";
 import { formItemProp } from "./config/search.config";
+
+// 表格
+import TableCpn from "@/components/table-cpn";
+import { propList } from "./config/table.config";
+
 export default {
   components: {
     SearchCpn,
+    TableCpn,
   },
   data() {
     return {
@@ -78,10 +86,12 @@ export default {
         envTemp: ["", ""],
         signal: ["", ""],
       },
+      tableConfig: {},
     };
   },
   created() {
     this.searchConfig = { formItemProp, searchForm: this.searchForm1 };
+    this.tableConfig = { propList };
   },
   methods: {
     handleSearchEvent(params) {

src/views/summary-data/individual-data/config/search.config.js → src/views/eartag-admin/eartag-data/config/search.config.js


+ 0 - 0
src/views/eartag-admin/eartag-data/config/table.config.js


Некоторые файлы не были показаны из-за большого количества измененных файлов