yrik 4 жил өмнө
parent
commit
ffe4c35ce9

+ 8 - 0
ruoyi-ui/src/api/system/config.js

@@ -16,6 +16,14 @@ export function listIndextwo(query) {
     // params: query
   })
 }
+// 获取表单查询字段、按钮、表头
+export function getTableQuery(data) {
+  return request({
+    url: '/boman-web-core/p/cs/getTableQuery',
+    method: 'POST',
+    data
+  })
+}
 
 
 

+ 4 - 1
ruoyi-ui/src/components/DynamicFormsteo/index.vue

@@ -49,7 +49,7 @@
     <!-- 上传文件 -->
     <el-upload :disabled="formConfig.disabshow" class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}"
       v-if="formConfig.htmlType == 'fileUpload'" :action="process + '/boman-file/upload'" :on-change="handleChange"
-      :on-success="upImageFn" :on-remove="reseImage" :file-list="config">
+      :on-success="upImageFn" :on-error="err" :on-remove="reseImage" :file-list="config">
       <el-button size="small" type="primary">点击上传</el-button>
       <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
     </el-upload>
@@ -214,6 +214,9 @@
       upImageFn(res, file) {
         this.config.push(res.data);
       },
+      err(){
+       console.log(35)
+      },
       init() {
         if (this.formConfig.htmlType == 'checkbox' || this.formConfig.htmlType == 'imageUpload' || this.formConfig.htmlType ==
           'fileUpload') {

+ 1 - 1
ruoyi-ui/src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
   title: '潜山市云数据中心',
-  urls: `http://192.168.101.10:8090`,
+  urls: `http://192.168.101.11:8090`,
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light

+ 94 - 15
ruoyi-ui/src/views/index.vue

@@ -203,14 +203,14 @@
                          </p>
                         <div class="index_memoranduMailnav">
                            <div class="tab_tol">
-                             <!-- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-                               <dynamic-forms :type="0" :ref="item.columnName" :config="queryParams" @inputs="changeFn" :formConfig="item"
-                                 v-for="(item,index) in queryDatathre.queryList" :key='index' />
-                               <el-form-item>
-                                 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-                                 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+                             <el-form class="iejgu" :model="queryParamsail" ref="queryForm" :inline="true" >
+                               <dynamic-forms :type="0" :ref="item.columnName" :config="queryParamsail" @inputs="changeFn" :formConfig="item"
+                                 v-for="(item,index) in queryDataali.queryList" :key='index' />
+                               <el-form-item style="width: 30%; text-align: right;">
+                                 <el-button type="primary"  size="mini" @click="handleQuerygty">搜索</el-button>
+
                                </el-form-item>
-                             </el-form> -->
+                             </el-form>
                              <el-table  stripe v-loading="loading" :data="postList.rows" @selection-change="handleSelectionChange">
                                <el-table-column :width="item.columnComment == 'id'? '40' : item.columnComment == '姓名'? '60' : '110'"  :label="item.columnComment" align="left" :prop="item.columnName" v-for="(item,index) in postList.tableHeadList" :key="index"  />
                              </el-table>
@@ -267,7 +267,7 @@
 </template>
 
 <script>
-import { listIndex, getUserProfile, listIndextwo, listIndextherr, listIndexfou, listIndextanl, getConfig, delConfig, addConfig, addConfigindex, updateConfig, clearCache, delIndexnabd,listIndexber } from "@/api/system/config";
+import { listIndex, getUserProfile, listIndextwo, listIndextherr, listIndexfou, listIndextanl, getConfig, delConfig, addConfig, addConfigindex, updateConfig, clearCache, delIndexnabd,listIndexber, getTableQuery } from "@/api/system/config";
 import Editor from '@/components/Editor';
 export default {
   name: "index",
@@ -358,6 +358,24 @@ export default {
         orderBy:'create_time desc',
         pageNo:1,
         pageSize:3,
+        fixedData:{
+          condition:{
+
+          }
+        }
+      },
+      // 通讯录搜索
+      queryParamsailss:{
+       table: '',
+       pageNo: 1,
+       isUi: false,
+       pageSize: 10,
+       orderBy: 'create_time desc',
+       fixedData: {
+         condition: {
+
+         }
+       }
       },
       queryParamsijeu:{
         table:'sys_contacts',
@@ -425,6 +443,7 @@ export default {
       queryData: {},
       queryDatatwo:{},
       queryDatathre:{},
+      queryDataali:{},
       nummer:0   ,//0 是日历  1 是备忘录
       forme:{
         table:'',
@@ -465,9 +484,11 @@ export default {
     // this.getLismemorandum()  //备忘录
     this.getLisail()//通讯录
     this.getLisailtwo()
+    this.init()
 
   },
   computed: {
+
      // 时间高亮的数组
      brightDate () {
        // let ary = []
@@ -485,6 +506,16 @@ export default {
 
    },
   methods: {
+    // 通讯录搜索
+    init() {
+      console.log(1243)
+      getTableQuery({
+        table: this.queryParamsijeu.table
+      }).then(res => {
+        let data = res.data
+        this.queryDataali = data
+      })
+    },
       // Tooltip 文字提示
         content (date) {
           let data = date
@@ -625,14 +656,17 @@ export default {
          if(response.data !== undefined){
            this.tableDataalid = response.data.tableHeadList;
            this.postList = response.data
-           this.postList.rows.filter(route => {
-             // route.dept_id = route.dept_id.value
-             for(var item in route){
-               if(typeof route[item] == 'object'){
-                 route[item]= route[item].value
+           if(this.postList.rows !== null){
+             this.postList.rows.filter(route => {
+               // route.dept_id = route.dept_id.value
+               for(var item in route){
+                 if(typeof route[item] == 'object'){
+                   route[item]= route[item].value
+                 }
                }
-             }
-           })
+             })
+           }
+
            this.totalali = response.data.total;
          }
          this.loading = false;
@@ -828,12 +862,57 @@ export default {
       this.title = '通知公告'
        this.openety = true,
        this.actingk=index
+    },
+    // 搜索
+    handleQuerygty(){
+    this.queryParams.pageNo = 1;
+    this.grabFn(this.queryDataali.queryList, this.queryParamsail.fixedData.condition)
+    this.getLisail()
+
+    },
+    // 抓取参数
+    grabFn(arr, parForm) {
+      for (let item of arr) {
+        if (item.htmlType == 'checkbox' || item.htmlType == 'imageUpload' || item.htmlType == 'fileUpload') {
+          if (this.$refs[item.columnName][0].config.length) {
+            parForm[item.columnName] = this.$refs[item.columnName][0].config
+          }
+        } else {
+          parForm[item.columnName] = this.$refs[item.columnName][0].config[item.columnName]
+        }
+      }
+    },
+    // 搜索重置  通讯录
+    resetQuery(){
+      console.log(12436)
+     this.queryParamsail.fixedData.condition = {}
+     this.queryParamsail.pageNo = 1
+     // this.resetForm("queryParamsail");
+     console.log(this.queryParamsail)
+     this.getLisail()
     }
   },
 };
 </script>
 
 <style lang="scss">
+  .iejgu{
+     .el-form-item__label{
+       width: 50px !important;
+        .el-input__inner{
+          width: 60%;
+        }
+     }
+     .el-form-item{
+       width: 70%;
+     }
+     .el-form--inline .el-form-item{
+
+     }
+     .el-form--inline .el-form-item__content{
+       width: 70%;
+     }
+  }
   .index_ese{
     .el-dialog__body{
       padding-top: 10px !important;