Browse Source

Merge remote-tracking branch 'origin/master'

Administrator 4 years ago
parent
commit
6923e905bc

+ 20 - 19
boman-web-core/src/main/java/com/boman/web/core/service/TableServiceCmdService.java

@@ -401,9 +401,26 @@ public class TableServiceCmdService {
         GenTable genTable = getTableFromRedisByTableName(RedisKey.TABLE_INFO, condition.getTable());
         List<GenTableColumn> columns = genTable.getColumns();
         JSONObject jsonObject = new JSONObject();
+
         // 查询字段
+        jsonObject.put(FormDataConstant.QUERY_LIST, getQueryColumns(columns));
+        // BUTTON_LIST
+        List<String> btns = buildBtnList(genTable.getTableName());
+        jsonObject.put(FormDataConstant.BUTTON_LIST, Strings.nullToEmpty(CollectionUtils.listToString(btns)));
+        jsonObject.put(ViewTypeConst.VIEW_TYPE, Strings.nullToEmpty(genTable.getTplCategory()));
+        jsonObject.put(RULES, packRequireColumn(columns));
+        return AjaxResult.success(jsonObject);
+    }
+
+    /**
+     * 功能描述:  查找表作为查询字段的列,如果有字典值并把字典值赋值
+     *
+     * @param allColumns allColumns
+     * @return java.util.List<com.boman.domain.GenTableColumn>
+     */
+    private List<GenTableColumn> getQueryColumns(List<GenTableColumn> allColumns) {
         ArrayList<GenTableColumn> queryList = Lists.newArrayListWithCapacity(16);
-        for (GenTableColumn column : columns) {
+        for (GenTableColumn column : allColumns) {
             if (GenTableColumn.IS_QUERY.equalsIgnoreCase(column.getIsQuery())) {
                 String dictType = column.getDictType();
                 if (ObjectUtils.isNotEmpty(dictType)) {
@@ -413,14 +430,7 @@ public class TableServiceCmdService {
                 queryList.add(column);
             }
         }
-
-        jsonObject.put(FormDataConstant.QUERY_LIST, queryList);
-
-        List<String> btns = buildBtnList(genTable.getTableName());
-        jsonObject.put(FormDataConstant.BUTTON_LIST, Strings.nullToEmpty(CollectionUtils.listToString(btns)));
-        jsonObject.put(ViewTypeConst.VIEW_TYPE, Strings.nullToEmpty(genTable.getTplCategory()));
-        jsonObject.put(RULES, packRequireColumn(columns));
-        return AjaxResult.success(jsonObject);
+        return queryList;
     }
 
     /**
@@ -462,16 +472,7 @@ public class TableServiceCmdService {
         GenTable genTable = getTableFromRedisByTableName(RedisKey.TABLE_INFO, condition.getTable());
         List<GenTableColumn> columns = genTable.getColumns();
         // 查询字段
-        ArrayList<GenTableColumn> queryList = Lists.newArrayListWithCapacity(16);
-        for (GenTableColumn column : columns) {
-            if (GenTableColumn.IS_QUERY.equalsIgnoreCase(column.getIsQuery())) {
-                String dictType = column.getDictType();
-                if (ObjectUtils.isNotEmpty(dictType)) {
-                    column.setSysDictData(listSysDictDataByType(dictType));
-                }
-                queryList.add(column);
-            }
-        }
+        List<GenTableColumn> queryList = getQueryColumns(columns);
 
         return AjaxResult.success(queryList);
     }

+ 18 - 14
ruoyi-ui/src/views/index.vue

@@ -11,8 +11,8 @@
                   <ul class="index_headerUl">
                     <li v-for="(item,index) in configList" :key="index" @click="headerCld(item)">
                         <img src="../assets/images/icon_list_sj.png" alt="">
-                        <p v-html="item.notice_title"></p>
-                        <span v-html="item.create_time"></span>
+                        <p>{{item.notice_title}}</p>
+                        <span>{{item.create_time}}</span>
                     </li>
                   </ul>
                   <div class="index_haderPagin">
@@ -112,8 +112,10 @@
                  <el-tab-pane label="用户管理" name="first"> -->
                    <div style="height: 84%;">
                         <div style="height: 85%;">
-                          <h3 style="text-align: center; margin: 35px 0;" v-html="tieku"></h3>
-                          <p class="index_profilep"  v-html="comg"> 	</p>
+                          <h3 style="text-align: center; margin: 35px 0; margin-bottom: 0;" v-html="tieku"></h3>
+                          <pre>
+                            <div class="index_profilep" v-html="comg"></div>
+                          </pre>
                         </div>
                                       <!-- {{getLisprofileone[0].info_content}} -->
                                       <div class="index_haderPagin">
@@ -206,6 +208,7 @@
                              </el-table>
                            </div>
                           <div class="index_haderPagin index_haderPaginfoiu">
+                            <!-- getLisail -->
                             <el-pagination
                                  @size-change="handleSizeChangeali"
                                  @current-change="handleCurrentChangeali"
@@ -245,7 +248,9 @@
            <div class="index_headertan" >
                <p v-html="actingk.notice_title == undefined? '暂无数据' : actingk.notice_title"></p>
                <p>{{actingk.create_time == undefined? '暂无数据' : actingk.create_time}} 发布人:{{actingk.create_by}}</p>
-               <p v-html="actingk.notice_content"></p>
+               <pre>
+                 <div v-html="actingk.notice_content"></div>
+               </pre>
            </div>
 
   </el-dialog>
@@ -344,7 +349,7 @@ export default {
         table:'sys_contacts',
         orderBy:'create_time desc',
         pageNo:1,
-        pageSize:6,
+        pageSize:3,
       },
       num:0,
       numlist:0,
@@ -361,7 +366,7 @@ export default {
         table:'sys_contacts',
         orderBy:'create_time desc',
         pageNo:1,
-        pageSize:6,
+        pageSize:4,
       },
       tableDataalid:[],
       getLisaillie:[],
@@ -618,7 +623,7 @@ export default {
    // 通讯录表头
    getLisail() {
      this.loading = true;
-     listIndexfou(this.aliemg).then(response => {
+     listIndexfou(this.queryParamsail).then(response => {
          if(response.data !== undefined){
            this.tableDataalid = response.data.tableHeadList;
            this.postList = response.data
@@ -690,7 +695,7 @@ export default {
        },
      handleCurrentChangeali(val) {
        this.queryParamsail.pageNo = val
-       this.getLisailtwo()
+       this.getLisail()
          console.log(`当前页: ${val}`);
        },
     handleClick(tab, event) {
@@ -1285,7 +1290,6 @@ export default {
   margin: 0 30px;
   p{
     margin: 0;
-    text-indent:2em;
   }
   p:nth-child(1){
     font-size: 24px;
@@ -1306,16 +1310,16 @@ export default {
     text-align: center;
     margin-bottom: 20px;
     text-indent:0em;
-
   }
-  p:nth-child(3){
+  pre{
     font-size: 16px;
     font-family: PingFang SC;
     font-weight: 400;
     color: #343434;
-    line-height: 24px;
-
   }
 }
+  pre{
+    white-space:pre-wrap;
+  }
 
 </style>

+ 8 - 3
ruoyi-ui/src/views/system/editing/index.vue

@@ -280,7 +280,7 @@
                    console.log(34)
                    // || route.mask.slice(3,4) == '0'
                    route.hrChildren.filter(routers =>{
-                     
+
                      routers.isonliy = true
                    })
                    // route.routers = true
@@ -413,9 +413,14 @@
               if(this.$refs[item.hrChildren[i].columnName][0].config.length){
                 this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
               }
+            } else if (item.hrChildren[i].htmlType == 'datetime') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+              }else{
+                this.queryParams[item.hrChildren[i].columnName] = null
+              }
             } else {
-              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
-                item.hrChildren[i].columnName]
+              this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
             }
           }
         }

+ 7 - 1
ruoyi-ui/src/views/system/form/index.vue

@@ -401,7 +401,13 @@
                if(this.$refs[item.hrChildren[i].columnName][0].config.length){
                  this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
                }
-             } else{
+             } else if (item.hrChildren[i].htmlType == 'datetime') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+              }else{
+                this.queryParams[item.hrChildren[i].columnName] = null
+              }
+            } else{
                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
              }
            }

+ 8 - 2
ruoyi-ui/src/views/system/table/index.vue

@@ -11,7 +11,7 @@
       <div class="table_headerBtun table_headerBtuntwo" v-if="queryData.buttonList">
         <el-button type="primary" size="mini" plain v-for="(item,index) in jeigneutwo" :key="index" @click="handleQuery(item)">{{item}}</el-button>
       </div>
-    </div>    
+    </div>
     <!-- 内容 -->
     <div class="table_nav headertable_nav" >
       <el-collapse v-model="activeNames" @change="handleChange">
@@ -150,6 +150,12 @@
               if (this.$refs[item.hrChildren[i].columnName][0].config.length) {
                 this.queryParams[item.hrChildren[i].columnName] = JSON.stringify(this.$refs[item.hrChildren[i].columnName][0].config)
               }
+            } else if (item.hrChildren[i].htmlType == 'datetime') {
+              if (this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]) {
+                this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[item.hrChildren[i].columnName]
+              }else{
+                this.queryParams[item.hrChildren[i].columnName] = null
+              }
             } else {
               this.queryParams[item.hrChildren[i].columnName] = this.$refs[item.hrChildren[i].columnName][0].config[
                 item.hrChildren[i].columnName]
@@ -331,7 +337,7 @@
       /** 新增 修改提交按钮 */
       submitForm: function() {
         this.$refs["queryForm"].validate(valid => {
-          if (valid) {
+          if (valid) {
             addbjectSave(this.forme).then(response => {
               this.msgSuccess("保存成功");
               this.open = false;