Jelajahi Sumber

查询接口变更,全部使用contentList,返回count

Bella 2 tahun lalu
induk
melakukan
cb14e04dee

+ 63 - 41
src/components/common/WholeProcessManagement.vue

@@ -1,9 +1,20 @@
 <template>
   <!-- 全流程管理列表组件 -->
   <div id="WholeProcessManagement">
-    <el-form :inline="true" ref="myTaskForm" :model="formInline" style="padding: 10px">
+    <el-form
+      :inline="true"
+      ref="myTaskForm"
+      :model="formInline"
+      style="padding: 10px"
+    >
       <el-form-item label="项目类型">
-        <el-select size="mini" v-model="formInline.c_task_type" placeholder="项目类型" clearable filterable>
+        <el-select
+          size="mini"
+          v-model="formInline.c_task_type"
+          placeholder="项目类型"
+          clearable
+          filterable
+        >
           <el-option
             v-for="item in selectSelectDataMap['projectType']"
             :key="item.index"
@@ -13,7 +24,13 @@
         </el-select>
       </el-form-item>
       <el-form-item label="所属街镇">
-        <el-select size="mini" v-model="formInline.c_owning_street_town" placeholder="所属街镇" clearable filterable>
+        <el-select
+          size="mini"
+          v-model="formInline.c_owning_street_town"
+          placeholder="所属街镇"
+          clearable
+          filterable
+        >
           <el-option
             v-for="item in selectSelectDataMap['associatedItems']"
             :key="item.index"
@@ -50,7 +67,8 @@
     >
       <el-table-column type="index" width="50"> </el-table-column>
       <el-table-column prop="c_project_id" label="项目编号"> </el-table-column>
-      <el-table-column prop="c_project_name" label="项目名称"> </el-table-column>
+      <el-table-column prop="c_project_name" label="项目名称">
+      </el-table-column>
       <el-table-column prop="c_task_type" label="项目类型">
         <template slot-scope="scope">
           {{ getSelectByIndex("projectType", scope.row.c_task_type) }}
@@ -58,7 +76,9 @@
       </el-table-column>
       <el-table-column prop="c_owning_street_town" label="所属街镇">
         <template slot-scope="scope">
-          {{ getSelectByIndex("associatedItems", scope.row.c_owning_street_town) }}
+          {{
+            getSelectByIndex("associatedItems", scope.row.c_owning_street_town)
+          }}
         </template>
       </el-table-column>
       <el-table-column prop="c_create_date" label="创建时间">
@@ -71,7 +91,11 @@
       <Pagination :paginationData="paginationData" />
     </div>
     <!-- 全流程管理流程组件 -->
-    <StepsMyBox id="stepsBox" v-show="StepsMyBoxShowState" @hideStepsMyBoxState="StepsMyBoxShowState = false" />
+    <StepsMyBox
+      id="stepsBox"
+      v-show="StepsMyBoxShowState"
+      @hideStepsMyBoxState="StepsMyBoxShowState = false"
+    />
   </div>
 </template>
 <script>
@@ -91,14 +115,14 @@ export default {
       // 数据字典暂存对象
       selectSelectDataMap: {
         projectType: [],
-        associatedItems: []
+        associatedItems: [],
       },
       StepsMyBoxShowState: false,
       //   查询条件
       formInline: {
         c_task_type: "",
         c_owning_street_town: "",
-        c_create_date: ""
+        c_create_date: "",
       },
       // 我的任务form表单
       tableData: [],
@@ -107,13 +131,13 @@ export default {
         currentPage: 1,
         pageSizes: [5, 10, 20, 50],
         total: 0,
-        currentChange: val => {
+        currentChange: (val) => {
           this.handleCurrentChange(val);
         },
-        handleSizeChange: val => {
+        handleSizeChange: (val) => {
           this.handleSizeChange(val);
-        }
-      }
+        },
+      },
     };
   },
   props: {},
@@ -131,12 +155,12 @@ export default {
       params.append("type", type);
       params.append("cName", cName);
       this.$Post(this.urlsCollection.selectByCNameAType, params).then(
-        res => {
+        (res) => {
           if (res.code === 200 && res.content.length > 0) {
             this.selectSelectDataMap[keyName] = res.content;
           }
         },
-        error => {
+        (error) => {
           this.$message.error(error);
           console.log(error);
         }
@@ -145,8 +169,11 @@ export default {
     // 数据字典对照显示
     getSelectByIndex(selectName, index) {
       let slotValue = "";
-      if (this.selectSelectDataMap[selectName] && this.selectSelectDataMap[selectName].length > 0) {
-        this.selectSelectDataMap[selectName].forEach(item => {
+      if (
+        this.selectSelectDataMap[selectName] &&
+        this.selectSelectDataMap[selectName].length > 0
+      ) {
+        this.selectSelectDataMap[selectName].forEach((item) => {
           if (item.index == index) {
             slotValue = item.name;
           }
@@ -168,7 +195,7 @@ export default {
     },
     // 查询事件
     onSubmit() {
-      if(!this.tableInitLoading){
+      if (!this.tableInitLoading) {
         this.tableInitLoading = true;
       }
       let params = new FormData();
@@ -182,8 +209,8 @@ export default {
           field: "c_task_type",
           searchType: "1",
           content: {
-            value: this.formInline.c_task_type
-          }
+            value: this.formInline.c_task_type,
+          },
         };
         searchParam.push(param1);
       }
@@ -192,8 +219,8 @@ export default {
           field: "c_owning_street_town",
           searchType: "1",
           content: {
-            value: this.formInline.c_owning_street_town
-          }
+            value: this.formInline.c_owning_street_town,
+          },
         };
         searchParam.push(param1);
       }
@@ -203,31 +230,26 @@ export default {
           searchType: "3",
           content: {
             start: this.formInline.c_create_date[0],
-            end: this.formInline.c_create_date[0]
-          }
+            end: this.formInline.c_create_date[0],
+          },
         };
         searchParam.push(param1);
       }
       params.append("search", JSON.stringify(searchParam));
       this.$Post(this.urlsCollection.selectContentList, params).then(
-        res => {
-          if (res.code === 200 && res.content.count > 0) {
-            this.paginationData.total = res.content.count;
-            console.log("请求到的总条数为:", res.content.count, this.paginationData.total);
-          }
-        },
-        error => {
-          console.log(error);
-        }
-      );
-      this.$Post(this.urlsCollection.selectContentListInfo, params).then(
-        res => {
-          if (res.code === 200 && res.content.length > 0) {
-            this.tableData = res.content;
+        (res) => {
+          if (res.code === 200 && res.content.data.length > 0) {
+            this.tableData = res.content.data;
             this.tableInitLoading = false;
+            this.paginationData.total = res.content.count;
+            console.log(
+              "请求到的总条数为:",
+              res.content.count,
+              this.paginationData.total
+            );
           }
         },
-        error => {
+        (error) => {
           this.tableInitLoading = false;
           console.log(error);
         }
@@ -238,7 +260,7 @@ export default {
       this.formInline = {
         c_task_type: "",
         c_owning_street_town: "",
-        c_create_date: ""
+        c_create_date: "",
       };
       this.onSubmit();
     },
@@ -255,8 +277,8 @@ export default {
     ToView(index) {
       this.StepsMyBoxShowState = true;
       console.log("选中的历史项目的index:", index);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="less" scoped>

+ 5 - 5
src/components/popup/LawPopup.vue

@@ -110,7 +110,6 @@ export default {
   },
   created() {
     this.timeOptions = [];
-    // this.typeOptions = [];
     // 时间选择
     for (let i = 1980; i < 2023; i++) {
       this.timeOptions.unshift({
@@ -136,18 +135,19 @@ export default {
 
       params = {
         columnId: 58,
-        states: 1,
+        states: 3,
         pageSize: this.currentPageSize,
         page: val - 1,
       };
 
-      this.$Post(this.urlsCollection.selectContentListInfo, params).then(
+      this.$Post(this.urlsCollection.selectContentList, params).then(
         (res) => {
           console.log(res, "当前的法律法规");
-          if (res.code === 200 && res.content.length > 0) {
+          if (res.code === 200 && res.content.data.length > 0) {
             console.log(res.content, "查询到的法律法规相关的数据");
             this.paginationData.currentPage = val;
-            this.tableData = res.content.map((v) => {
+            this.paginationData.total = res.content.count
+            this.tableData = res.content.data.map((v) => {
               return {
                 id: v.id || "",
                 title: v.c_name || "--",

+ 5 - 4
src/views/FrequencyView.vue

@@ -196,16 +196,17 @@ export default {
       let params = new FormData();
       params = {
         columnId: 57,
-        states: 1,
+        states: 3,
         pageSize: this.currentPageSize,
         page: val - 1,
       };
 
-      this.$Post(this.urlsCollection.selectContentListInfo, params).then(
+      this.$Post(this.urlsCollection.selectContentList, params).then(
         (res) => {
-          if (res.code === 200 && res.content.length > 0) {
+          if (res.code === 200 && res.content.data.length > 0) {
             this.paginationData.currentPage = val;
-            this.tableData = res.content.map((v) => {
+            this.paginationData.total = res.content.count
+            this.tableData = res.content.data.map((v) => {
               return {
                 id: v.id || "--",
                 createYear: v.c_years || "--",

+ 32 - 6
src/views/LawView.vue

@@ -97,9 +97,9 @@ export default {
   components: { NewSelect, Pagination, LawDetailsPopup, FilePreview },
   data() {
     return {
+      // 数据字典暂存对象
+      classDictMap: {},
       searchInput: "",
-      sortSelectVal: "",
-      sortOptions: [],
       typeSelectVal: "",
       typeOptions: [],
       timeSelectVal: "",
@@ -140,9 +140,34 @@ export default {
         label: key,
       });
     }
+    // 审计等级
+    this.classDictQuery("0", "sj_class", "审计等级");
+    this.classDictQuery("0", "sh_law_type", "审计类别");
     this.getTableData(1);
   },
   methods: {
+    // 数据字典查询 -- 获取所需类别
+    classDictQuery(type, cName, keyName) {
+      let params = new FormData();
+      params = {
+        type: type,
+        cName: cName,
+      };
+      this.$Post(this.urlsCollection.selectByCNameAType, params).then(
+        (res) => {
+          if (res.code === 200 && res.content.length > 0) {
+            this.classDictMap[keyName] = new Map();
+            res.content.forEach((v) => {
+              this.classDictMap[keyName].set(v.index, v.name);
+            });
+          }
+        },
+        (error) => {
+          this.$message.error();
+          console.log(error);
+        }
+      );
+    },
     queryEvent() {
       console.log("查询");
     },
@@ -158,18 +183,19 @@ export default {
 
       params = {
         columnId: 58,
-        states: 1,
+        states: 3,
         pageSize: this.currentPageSize,
         page: val - 1,
       };
 
-      this.$Post(this.urlsCollection.selectContentListInfo, params).then(
+      this.$Post(this.urlsCollection.selectContentList, params).then(
         (res) => {
           console.log(res, "当前的法律法规");
-          if (res.code === 200 && res.content.length > 0) {
+          if (res.code === 200 && res.content.data.length > 0) {
             console.log(res.content, "查询到的法律法规相关的数据");
             this.paginationData.currentPage = val;
-            this.tableData = res.content.map((v) => {
+            this.paginationData.total = res.content.count;
+            this.tableData = res.content.data.map((v) => {
               return {
                 id: v.id || "",
                 title: v.c_name || "--",