瀏覽代碼

feature/添加备注&&年份

dengrui 11 月之前
父節點
當前提交
3ef7e1fa1a
共有 3 個文件被更改,包括 32 次插入24 次删除
  1. 2 2
      .env.development
  2. 2 1
      src/views/analysis/process/index.vue
  3. 28 21
      src/views/analysis/target/index/index.vue

+ 2 - 2
.env.development

@@ -8,9 +8,9 @@ VITE_APP_PORT = 3005
 VITE_APP_BASE_API = '/dev-api'
 
 # 上传文件接口地址
-VITE_APP_UPLOAD_URL = 'http://192.168.101.188:7105'
+VITE_APP_UPLOAD_URL = 'http://192.168.101.4:7105'
 # 开发接口地址
- VITE_APP_API_URL = 'http://192.168.101.188:7105'
+ VITE_APP_API_URL = 'http://192.168.101.4:7105'
 
 
 # 是否启用 Mock 服务

+ 2 - 1
src/views/analysis/process/index.vue

@@ -87,6 +87,7 @@
                 type="year"
                 style="width: 160px"
                 placeholder="Pick a year"
+                value-format="YYYY"
                 :clear-icon="''"
                 @change="getTableData"
               />
@@ -644,7 +645,7 @@ const getTableData = async () => {
   const { data, code, msg } = await getData({
     pageNo: currentOption.page,
     pageSize: currentOption.limit,
-    year: year.value,
+    yearStr: year.value,
   });
   if (code == "200") {
     tableData.value = data.records;

+ 28 - 21
src/views/analysis/target/index/index.vue

@@ -84,6 +84,7 @@
                 class="btn"
                 type="year"
                 style="width: 160px"
+                value-format="YYYY"
                 placeholder="Pick a year"
                 :clear-icon="''"
                 @change="getTableData"
@@ -325,6 +326,11 @@
                     ><span>{{ row.measure }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column align="center" prop="remark" label="备注">
+                  <template #default="{ row }"
+                    ><span>{{ row.remark }}</span>
+                  </template>
+                </el-table-column>
                 <el-table-column
                   align="center"
                   width="160"
@@ -545,7 +551,7 @@
                   </template>
                 </el-table-column>
                 <el-table-column
-                  width="120"
+                  width="60"
                   align="center"
                   prop="measure"
                   label="处置措施"
@@ -554,6 +560,16 @@
                     ><span>{{ row.measure }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column
+                  width="60"
+                  align="center"
+                  prop="remark"
+                  label="备注"
+                >
+                  <template #default="{ row }"
+                    ><span>{{ row.remark }}</span>
+                  </template>
+                </el-table-column>
               </el-table>
               <div class="illustrate">
                 <div>
@@ -865,6 +881,14 @@
                 <el-form-item label="处置措施" prop="measure">
                   <el-input v-model="addData.measure" />
                 </el-form-item>
+                <el-form-item label="备注" prop="remark">
+                  <el-input
+                    maxlength="40"
+                    show-word-limit
+                    type="textarea"
+                    v-model="addData.remark"
+                  />
+                </el-form-item>
               </el-form>
             </el-scrollbar>
           </div>
@@ -900,7 +924,6 @@
 </template>
 
 <script setup>
-import * as echarts from "echarts";
 import { useDictionaryStore } from "@/store";
 import { getData2, addDatas, deleteData, updateData } from "@/api/analysis";
 const tableData = ref([]);
@@ -956,7 +979,6 @@ const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
 //解决动态表格数据视图不更新问题
 const filterData = (data) => {
   // 合并内容相同的单元格
-  let contactDot = 0;
   let spanArr = [];
   data.forEach((item, index) => {
     spanArr.push(3);
@@ -994,7 +1016,7 @@ const getTableData = async () => {
   const { data, code, msg } = await getData2({
     pageNo: currentOption.page,
     pageSize: currentOption.limit,
-    year: year.value,
+    yearStr: year.value,
   });
   if (code == "200") {
     tableData.value = data.records;
@@ -1056,23 +1078,6 @@ const ruleFormRef = ref(null);
 const addIndex = (index) => {
   return index + 1;
 };
-const addItem = {
-  abnormal: "",
-  accuracy1: 0,
-  accuracy2: 0,
-  accuracy3: 0,
-  accuracy4: 0,
-  accuracy5: 0,
-  analyseUser: "",
-  avg: 0,
-  batchNo: "",
-  checkDeviceNo: "",
-  checkUser: "",
-  dateStr: "",
-  measure: "",
-  model: "",
-  range: 0,
-};
 const rules = {
   dateStr: [
     {
@@ -1632,10 +1637,12 @@ onMounted(() => {
       font-size: 10px;
       fontweight: 300px;
       color: black;
+      line-height: 11px !important;
     }
     :deep(.cell) {
       padding: 0 1px !important;
       font-size: 12px !important;
+      line-height: 11px !important;
     }
     :deep(.el-table__cell) {
       padding: 0px !important;