소스 검색

我的任务表字段调整

DESKTOP-6LTVLN7\Liumouren 2 년 전
부모
커밋
1e8fa69da3

+ 1 - 1
src/components/common/BottomForm/CreateTaskForm.vue

@@ -207,7 +207,7 @@ export default {
       params.append("states", "2,3");
       params.append("pageSize", 999);
       params.append("page", 0);
-      let sortparam = [{ field: "c_create_date", orderByType: 2 }];
+      let sortparam = [{ field: "c_create_time", orderByType: 2 }];
       params.append("orderBy", JSON.stringify(sortparam));
       this.$Post(this.urlsCollection.selectContentList, params).then(
         res => {

+ 1 - 1
src/components/common/BottomForm/MyMission.vue

@@ -166,7 +166,7 @@ export default {
       params.append("states", "2,3");
       params.append("pageSize", 999);
       params.append("page", 0);
-      let sortparam = [{ field: "c_create_date", orderByType: 2 }];
+      let sortparam = [{ field: "c_create_time", orderByType: 2 }];
       params.append("orderBy", JSON.stringify(sortparam));
       this.$Post(this.urlsCollection.selectContentList, params).then(
         res => {

+ 14 - 15
src/components/common/FilePreView.vue

@@ -2,22 +2,22 @@
   <!--  图片、pdf、docx 预览
           "docx-preview": "^0.1.4",
           "jszip": "^3.10.0",-->
-  <div style="width:100%;height:100%;">
-    <div title="文件预览" v-if="showDoc || showPdf || showImg" width="750px" style="background: #FFF !important;width:100%;" :style="{height: boxHeight ? boxHeight : '100%'}">
-      <template slot="closeIcon">
-        <el-icon icon="close-circle" class="closeIcon" />
-      </template>
-      <template slot="footer">
-        <div v-if="showPdf" class="pdf-layout-page">
-          <el-button @click="changePdfPage(0)" :disabled="currentPage === 1" name="上一页" />
-          {{ currentPage }} / {{ pageCount }}
-          <el-button @click="changePdfPage(1)" :disabled="currentPage === pageCount" name="下一页" />
-        </div>
-        <el-button name="取消" @click="cancel" />
-      </template>
+  <div style="width: 100%; height: 100%">
+    <div v-if="showPdf" class="pdf-layout-page" style="position: absolute; bottom: 10px; right: 50px; z-index: 999">
+      当前{{ currentPage }}页 / 共{{ pageCount }}页
+      <el-button type="primary" size="mini" :disabled="currentPage === 1" @click="changePdfPage(0)">上一页</el-button>
+      <el-button type="primary" size="mini" :disabled="currentPage === pageCount" @click="changePdfPage(1)">下一页</el-button>
+    </div>
+    <div
+      title="文件预览"
+      v-if="showDoc || showPdf || showImg"
+      width="750px"
+      style="background: #fff !important; width: 100%"
+      :style="{ height: boxHeight ? boxHeight : '100%' }"
+    >
       <div class="modal-body form">
         <div v-if="showImg">
-          <img :src="images" preview="1" preview-text="" style="width: 100%" />
+          <img :src="images" preview="1" preview-text="" style="width: 100%" /> 
         </div>
 
         <div v-show="showDoc" ref="word">
@@ -123,7 +123,6 @@ export default {
   overflow: auto;
 }
 .pdf-layout-page {
-  left: 30%;
   margin: auto;
   display: inline-block;
   text-align: center;

+ 13 - 3
src/components/common/TagCard.vue

@@ -5,7 +5,7 @@
       <!-- 上下布局 -->
       <div v-if="data.type !== 'lr'" class="tbFlx">
         <div class="tagValue">
-          <span>{{ data.value  ? data.value : (data.valueData ? data.valueData[data.valueData.length - 1] : "--") }}</span
+          <span>{{ data.value  ? data.value : "--" }}</span
           ><span>{{ data.unit ? data.unit : "--" }}</span>
         </div>
         <div class="tagImg">
@@ -20,7 +20,7 @@
         </div>
         <div>
           <div class="tagValue">
-            <span>{{ data.value ? data.value : (data.valueData ? data.valueData[data.valueData.length - 1] : "--" )}}</span
+            <span>{{ data.value ? data.value : "--"}}</span
             ><span>{{ data.unit ? data.unit : "--" }}</span>
           </div>
           <div class="tagTitle">{{ data.title ? data.title : "--" }}</div>
@@ -61,7 +61,17 @@ export default {
       console.log("预留事件,主要是阻止click冒泡!");
     }
   },
-  watch: {}
+  watch: {
+    data: {
+      handler(val) {
+        this.$nextTick(() => {
+          console.log('TagCard data',val.value);
+          // this.showChange();
+        });
+      },
+      deep: true
+    }
+  }
 };
 </script>
 

+ 33 - 21
src/components/layout/MenuCard.vue

@@ -157,6 +157,7 @@ export default {
   mounted() {
     this.$nextTick(() => {
       try {
+        // 读取静态文件逻辑(commonDataGetUrl为静态文件路径,需要注意的是commonDataGetUrl属性在topSolt属性下面)
         if (this.menuData && this.menuData.topSolt && this.menuData.topSolt.commonDataGetUrl) {
           this.dataInitLoading = true;
           this.$Get("/static/json/home/" + this.menuData.topSolt.commonDataGetUrl).then(
@@ -233,12 +234,17 @@ export default {
               this.dataInitLoading = false;
             }
           );
-        } else if (
-          this.menuData &&
-          this.menuData.columnId &&
-          this.menuData.commonName !== "SUM" &&
-          this.menuData.commonName !== "ALLLIST"
-        ) {
+        } else if (this.menuData.commonName && this.menuData.commonName === "TOP") {
+          // top列表
+          this.topData(this.$store.state.homeSpecialTown);
+        } else if (this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
+          // conut(*) group by
+          this.allListData(this.$store.state.homeSpecialTown);
+        } else if (this.menuData.commonName && this.menuData.commonName === "SUM") {
+          // for => conut(*) where
+          this.sumData(this.$store.state.homeSpecialTown);
+        } else if (this.menuData && this.menuData.columnId) {
+          // 默认查询DMS数据逻辑
           this.dataInitLoading = true;
           let params = new FormData();
           params.append("columnId", this.menuData.columnId);
@@ -334,12 +340,6 @@ export default {
               this.dataInitLoading = false;
             }
           );
-        } else if (this.menuData.commonName && this.menuData.commonName === "TOP") {
-          this.topData(this.$store.state.homeSpecialTown);
-        } else if (this.menuData.commonName && this.menuData.commonName === "ALLLIST") {
-          this.allListData(this.$store.state.homeSpecialTown);
-        } else if (this.menuData.commonName && this.menuData.commonName === "SUM") {
-          this.sumData(this.$store.state.homeSpecialTown);
         }
         // 只有第一次创建该页面,或刷新页面时。
         if (this.menuData.menuIndex) {
@@ -594,22 +594,34 @@ export default {
     changeHomeSpecialTown() {
       try {
         this.dataInitLoading = true;
+        // 如果静态文件中的数据存在,直接返回
         if (this.resData[this.$store.state.homeSpecialTown] && this.menuData.topSolt && this.menuData.topSolt.commonData) {
+          // 普通街道
           if (this.resData[this.$store.state.homeSpecialTown].categoryData) {
             this.menuData.topSolt.commonData[0].categoryData = this.resData[this.$store.state.homeSpecialTown].categoryData;
             this.menuData.topSolt.commonData[0].valueData = this.resData[this.$store.state.homeSpecialTown].valueData;
+            this.menuData.topSolt.commonData[0].value =
+              this.resData[this.$store.state.homeSpecialTown].valueData[
+                this.resData[this.$store.state.homeSpecialTown].valueData.length - 1
+              ];
           } else {
+            // 全部
             let _index = 0;
             for (let keys in this.resData["全部"]) {
-              this.menuData.topSolt.commonData[_index].title = keys;
-              this.menuData.topSolt.commonData[_index].categoryData =
-                this.resData[this.$store.state.homeSpecialTown][keys].categoryData;
-              this.menuData.topSolt.commonData[_index].valueData =
-                this.resData[this.$store.state.homeSpecialTown][keys].valueData;
-              this.menuData.topSolt.commonData[_index].value =
-                this.resData[this.$store.state.homeSpecialTown][keys].valueData[
-                  this.resData[this.$store.state.homeSpecialTown][keys].valueData.length - 1
-                ];
+              let _commonData = {
+                title: keys,
+                unit: this.menuData.topSolt.commonData[_index].unit,
+                categoryData: this.resData[this.$store.state.homeSpecialTown][keys].categoryData,
+                valueData: this.resData[this.$store.state.homeSpecialTown][keys].valueData,
+                value:
+                  this.resData[this.$store.state.homeSpecialTown][keys].valueData[
+                    this.resData[this.$store.state.homeSpecialTown][keys].valueData.length - 1
+                  ]
+              };
+              if(this.menuData.topSolt.commonData[_index].type){
+                _commonData.type = this.menuData.topSolt.commonData[_index].type
+              }
+              this.menuData.topSolt.commonData[_index] = _commonData;
               _index++;
             }
           }

+ 2 - 3
src/config/common.js

@@ -636,9 +636,8 @@ export const menuOnLine = {
           {
             type: "tb",
             title: "土地资源面积",
-            valueData: [
-              172
-            ],
+            valueData: [],
+            categoryData: [],
             unit: "km²"
           }
         ]