yrik 4 年之前
父节点
当前提交
1c47ae0eae

+ 19 - 12
ruoyi-ui/src/components/DynamicForms/index.vue

@@ -2,56 +2,56 @@
   <el-form-item :label="formConfig.columnComment" style="display: inline-block;" :prop="formConfig.columnName">
     <!-- 输入框 -->
     <el-input v-if="formConfig.htmlType == 'input'" v-model="config[formConfig.columnName]" :placeholder="'请输入'+formConfig.columnComment"
-      clearable @keyup.enter.native="handleQuery" />
+      clearable @keyup.enter.native="handleQuery"  :disabled="formConfig.disabshow" />
     <!-- 多行输入框 -->
     <el-input v-if="formConfig.htmlType == 'textarea'" type="textarea" v-model="config[formConfig.columnName]"
-      :placeholder="'请输入'+formConfig.columnComment" clearable @keyup.enter.native="handleQuery" />
+      :placeholder="'请输入'+formConfig.columnComment" clearable @keyup.enter.native="handleQuery" :disabled="formConfig.disabshow"/>
     <!-- 下拉框 -->
     <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(!formConfig.fkInfo.fkTableName)"
-      filterable :placeholder="'请输入'+formConfig.columnComment">
+      filterable :placeholder="'请输入'+formConfig.columnComment" :disabled="formConfig.disabshow">
       <el-option v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictLabel"
         :value="itemChild.dictValue">
       </el-option>
     </el-select>
     <!-- 下拉框搜索 -->
-    <el-select v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo.fkTableName)"
+    <el-select :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'select'&&(formConfig.fkInfo.fkTableName)"
       filterable remote :remote-method="remoteMethod" :loading="loading" :placeholder="'请输入'+formConfig.columnComment">
       <el-option v-for="itemChild in filterList" :key="itemChild.table_id" :label="itemChild.table_name" :value="itemChild.table_id">
       </el-option>
     </el-select>
     <!-- 复选框 -->
-    <el-checkbox-group v-model="config" v-if="formConfig.htmlType == 'checkbox'">
+    <el-checkbox-group :disabled="formConfig.disabshow" v-model="config" v-if="formConfig.htmlType == 'checkbox'">
       <el-checkbox @change="handleCheckedCitiesChange" v-for="itemChild in formConfig.sysDictData" :label="itemChild.dictValue"
         :key="itemChild.dictLabel">
         {{itemChild.dictLabel}}
       </el-checkbox>
     </el-checkbox-group>
     <!-- 单选框 -->
-    <el-radio-group v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
+    <el-radio-group :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'radio'">
       <el-radio v-for="itemChild in formConfig.sysDictData" :key="itemChild.dictValue" :label="itemChild.dictValue">{{itemChild.dictLabel}}</el-radio>
     </el-radio-group>
     <!-- 时间控件 -->
-    <el-date-picker v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'" type="date"
+    <el-date-picker :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'datetime'" type="date"
       :placeholder="'请输入'+formConfig.columnComment">
     </el-date-picker>
     <!-- 上传图片 -->
-    <el-upload v-if="formConfig.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}" :action="process + '/boman-file/upload'"
+    <el-upload :disabled="formConfig.disabshow" v-if="formConfig.htmlType == 'imageUpload'" :headers="{Authorization: 'Bearer ' + getToken()}" :action="process + '/boman-file/upload'"
       :file-list="config" list-type="picture-card" :on-preview="handlePictureCardPreview" :on-success="upImageFn"
       :on-remove="reseImage">
       <i class="el-icon-plus"></i>
     </el-upload>
-    <el-dialog :visible.sync="dialogVisible" v-if="formConfig.htmlType == 'imageUpload'">
+    <el-dialog :disabled="formConfig.disabshow" :visible.sync="dialogVisible" v-if="formConfig.htmlType == 'imageUpload'">
       <img width="100%" :src="dialogImageUrl" alt="">
     </el-dialog>
     <!-- 上传文件 -->
-    <el-upload class="upload-demo" :headers="{Authorization: 'Bearer ' + getToken()}" v-if="formConfig.htmlType == 'fileUpload'"
+    <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">
       <el-button size="small" type="primary">点击上传</el-button>
       <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
     </el-upload>
     <!-- 富文本 -->
-    <editor v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'" :min-height="192" />
+    <editor  :disabled="formConfig.disabshow" v-model="config[formConfig.columnName]" v-if="formConfig.htmlType == 'editor'" :min-height="192" />
   </el-form-item>
 </template>
 
@@ -100,7 +100,14 @@
       },
     },
     created() {
-      this.config = {}
+      this.config = {}
+      console.log(this.formConfig.mask.slice(3,4),876454)
+      if(this.formConfig.mask.slice(3,4) == '0'){
+          this.formConfig.disabshow = true
+      }else{
+        this.formConfig.disabshow = false
+      }
+      console.log(this.formConfig)
       this.init()
     },
     mounted() {},

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

@@ -3,6 +3,7 @@
     <!-- 头部 -->
     <div class="eniting_header">
       <!-- <p class="p">表编辑</p> -->
+      <p></p>
       <div class="ppl">
         <p v-for="(item,index) in tabldie" :key="index" @click="enditTab(index)">
           <img src="../../../assets/images/icon_tbtab_normal.png" alt="" class="index_headerImg" v-if="num !== index">
@@ -46,6 +47,7 @@
   } from '@/api/system/table.js';
   export default {
     name: "index",
+    inject: ['reload'],
     data() {
       return {
         activeNames: ['1'],
@@ -206,8 +208,7 @@
           if (this.tabldie.length !== 0) {
             this.init()
           } else {
-            this.msgSuccess("暂无数据");
-
+            this.msgSuccess("暂无tab数据");
             this.$router.go(-1)
           }
           // this.msgSuccess("反提交成功");

+ 18 - 18
ruoyi-ui/src/views/system/surface/index.vue

@@ -130,7 +130,7 @@
     },
     methods: {
       routerFn(id, tables) {
-        if (this.queryData.viewType == 'crud') {
+        // if (this.queryData.viewType == 'crud') {
           this.$router.push({
             path: '/business/table',
             query: {
@@ -138,23 +138,23 @@
               tables,
             },
           })
-        } else if (this.queryData.viewType == 'headTab') {
-          this.$router.push({
-            path: '/business/editing',
-            query: {
-              id,
-              tables,
-            },
-          })
-        } else if (this.queryData.viewType == 'itemTab') {
-          this.$router.push({
-            path: '/business/form',
-            query: {
-              id,
-              tables,
-            },
-          })
-        }
+        // } else if (this.queryData.viewType == 'headTab') {
+        //   this.$router.push({
+        //     path: '/business/editing',
+        //     query: {
+        //       id,
+        //       tables,
+        //     },
+        //   })
+        // } else if (this.queryData.viewType == 'itemTab') {
+        //   this.$router.push({
+        //     path: '/business/form',
+        //     query: {
+        //       id,
+        //       tables,
+        //     },
+        //   })
+        // }
       },
       headerBtn(item) {
         switch (item) {

+ 0 - 1
ruoyi-ui/src/views/system/table/index.vue

@@ -12,7 +12,6 @@
       <el-collapse v-model="activeNames" @change="handleChange">
         <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="120px">
         <el-collapse-item :title="item.columnComment" :name="index" v-for="(item,index) in queryData.showData" :key="index" >
-
             <el-row :gutter="0">
               <el-col :span="24"  :key="index">
                   <dynamic-forms :ref="items.columnName" :config="queryParams" @inputs = "changeFn" :formConfig="items" v-for="(items,indexs) in item.hrChildren" :key='indexs' />

+ 2 - 1
ruoyi-ui/src/views/tool/gen/editTable.vue

@@ -589,7 +589,8 @@
         // 获取表详细信息
         getGenTable(tableId).then(res => {
           this.cloumns = res.data.rows;
-          this.info = res.data.info;
+          this.info = res.data.info;
+          console.log(this.info,33456)
           this.tables = res.data.tables;
         });
         //查询数据库sql