Browse Source

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

lph 1 year ago
parent
commit
97f0deda03

+ 47 - 36
zkqy-ui/src/views/bpmprocess/scriptManage.vue

@@ -78,10 +78,12 @@
           icon="el-icon-search"
           size="mini"
           @click="handleQuery"
-          >搜索</el-button
+        >搜索
+        </el-button
         >
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
+        >重置
+        </el-button
         >
       </el-form-item>
     </el-form>
@@ -95,7 +97,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:script:add']"
-          >新增</el-button
+        >新增
+        </el-button
         >
       </el-col>
       <!-- <el-col :span="1.5">
@@ -119,7 +122,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:script:remove']"
-          >删除</el-button
+        >删除
+        </el-button
         >
       </el-col>
       <!-- <el-col :span="1.5">
@@ -144,11 +148,11 @@
       :data="scriptList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
-      <el-table-column label="脚本编码" align="center" prop="scriptKey" />
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="编号" align="center" prop="id"/>
+      <el-table-column label="脚本编码" align="center" prop="scriptKey"/>
       <!-- <el-table-column label="脚本方法名称" align="center" prop="scriptFunctionName" /> -->
-      <el-table-column label="脚本名称" align="center" prop="scriptName" />
+      <el-table-column label="脚本名称" align="center" prop="scriptName"/>
       <!-- <el-table-column
         label="脚本方法体"
         align="center"
@@ -192,7 +196,8 @@
                   icon="el-icon-edit"
                   @click="handleUpdate(scope.row)"
                   v-hasPermi="['system:script:edit']"
-                  >修改</el-button
+                >修改
+                </el-button
                 >
               </el-dropdown-item>
 
@@ -203,7 +208,8 @@
                   icon="el-icon-delete"
                   @click="handleDelete(scope.row)"
                   v-hasPermi="['system:script:remove']"
-                  >删除</el-button
+                >删除
+                </el-button
                 >
               </el-dropdown-item>
             </el-dropdown-menu>
@@ -241,7 +247,7 @@
           </el-col>
         </el-form-item>
         <el-form-item label="脚本名称:" prop="scriptName">
-          <el-input v-model="form.scriptName" placeholder="请输入脚本名称" />
+          <el-input v-model="form.scriptName" placeholder="请输入脚本名称"/>
         </el-form-item>
         <el-form-item label="脚本类型:" prop="scriptType">
           <!-- <el-input v-model="form.scriptName" placeholder="请输入脚本名称" /> -->
@@ -274,23 +280,26 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item label="方法名:" prop="scriptFunctionName">
-          <el-input
-            v-model="form.scriptFunctionName"
-            placeholder="请输入脚本方法名称"
-          />
-        </el-form-item>
 
-        <el-form-item label="方法体:" prop="scriptFunctionCode"> -->
-        <!-- <el-input
-            v-model="form.scriptFunctionCode"
-            type="textarea"
-            placeholder="请输入内容"
-          /> -->
-        <!-- <div ref="container" class="monaco-container">
-          </div> -->
-        <!-- <el-button icon="el-icon-edit" @click="drawerOpenHandler"></el-button>
-        </el-form-item> -->
+        <!--        <el-form-item label="方法名:" prop="scriptFunctionName">-->
+        <!--          <el-input-->
+        <!--            v-model="form.scriptFunctionName"-->
+        <!--            placeholder="请输入脚本方法名称"-->
+        <!--          />-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="方法体:" prop="scriptFunctionCode">-->
+        <!--          <el-input-->
+        <!--            v-model="form.scriptFunctionCode"-->
+        <!--            type="textarea"-->
+        <!--            placeholder="请输入内容"-->
+        <!--          />-->
+        <!--          <div ref="container" class="monaco-container">-->
+        <!--          </div>-->
+        <!--          <el-button icon="el-icon-edit" @click="drawerOpenHandler"></el-button>-->
+        <!--        </el-form-item>-->
+
+
+
         <el-form-item
           v-show="form.scriptType != '2'"
           label="数据表:"
@@ -334,7 +343,7 @@
 </template>
 
 <script>
-import { listScript, getScript, addScript } from "@/api/bpmprocess/process";
+import {listScript, getScript, addScript} from "@/api/bpmprocess/process";
 import {
   updateScript,
   delScript,
@@ -342,15 +351,15 @@ import {
 } from "@/api/bpmprocess/script";
 import uuid from "@/utils/bpmn/uuid";
 import Editor from "vue2-ace-editor";
-import { v4 as uuidv4 } from "uuid";
+import {v4 as uuidv4} from "uuid";
 import * as monaco from "monaco-editor";
 import Clipboard from "clipboard";
-import { Cog } from "lucide-vue";
+import {Cog} from "lucide-vue";
 
 export default {
   name: "Script",
   dicts: ["bpm_script_type", "industry_type"],
-  components: { Editor },
+  components: {Editor},
   data() {
     return {
       // 遮罩层
@@ -391,7 +400,7 @@ export default {
       // 表单校验
       rules: {
         scriptName: [
-          { required: true, message: "请输入脚本名称", trigger: "blur" },
+          {required: true, message: "请输入脚本名称", trigger: "blur"},
         ],
         // scriptFunctionName: [
         //   { required: true, message: "请输入脚本函数名", trigger: "blur" },
@@ -400,10 +409,10 @@ export default {
         //   { required: true, message: "请输入脚本函数体", trigger: "blur" },
         // ],
         scriptType: [
-          { required: true, message: "请选择脚本类型", trigger: "change" },
+          {required: true, message: "请选择脚本类型", trigger: "change"},
         ],
         industryType: [
-          { required: true, message: "请选择脚本类型", trigger: "change" },
+          {required: true, message: "请选择脚本类型", trigger: "change"},
         ],
         // tableName: [
         //   { required: true, message: "请选择数据表", trigger: "change" },
@@ -578,7 +587,8 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {});
+        .catch(() => {
+        });
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -624,7 +634,8 @@ export default {
             done();
           }
         )
-        .catch(() => {});
+        .catch(() => {
+        });
     },
   },
 };

+ 151 - 185
zkqy-ui/src/views/index.vue

@@ -50,7 +50,7 @@
     </el-row> -->
     <div class="info-content">
       <!-- <div class="header" @click="toPersonalCenter"> -->
-      <!-- <img :src="avatar" class="user-avatar" /> -->
+        <!-- <img :src="avatar" class="user-avatar" /> -->
       <!-- </div> -->
       <!-- <div class="name">{{ nickName }}</div>
       <div class="tenant-name">{{ tenantName }}</div>
@@ -81,12 +81,8 @@
         <div class="swiper-container">
           <div class="swiper-scrollbar"></div>
           <div class="swiper-wrapper">
-            <div
-              class="swiper-slide"
-              v-for="(item, index) in swiperList"
-              :key="index"
-            >
-              <div>
+            <div class="swiper-slide" v-for="(item,index) in swiperList" :key="index">
+              <div >
                 <span class="name">{{ item.oper_name }}</span>
                 <span class="ip">{{ item.oper_ip }}</span>
               </div>
@@ -108,8 +104,8 @@
 import { formatDate } from "@/utils";
 import { getToken } from "@/utils/auth";
 import { mapGetters, mapState } from "vuex";
-import "swiper/css/swiper.css";
-import Swiper from "swiper";
+import 'swiper/css/swiper.css';
+import Swiper from 'swiper';
 import {
   getProcess,
   getOperation,
@@ -122,6 +118,7 @@ export default {
   name: "Index",
   data() {
     return {
+      echars: true,
       chartObj: {
         myChart1: null,
         myChart2: null,
@@ -186,52 +183,51 @@ export default {
   },
   methods: {
     initData() {
-      console.log(1111);
       //工业流&审批流
       getProcess().then((response) => {
-        if (response.code == 200) {
+        if(response.code == 200){
           this.processList = response.data;
           console.log(response.data);
           this.chartObj.myChart1.setOption({
             series: [
               {
-                data: response.data,
-              },
-            ],
-          });
+                data: response.data
+              }
+            ]
+          })
         } else {
           console.log(response);
           this.$message.error("获取数据失败");
         }
-      });
+      })
 
       //登录次数统计
-      getLogin().then((response) => {
-        if (response.code == 200) {
-          let xAxisData = response.data[0].date;
+      getLogin().then(response => {
+        if(response.code == 200){
+          let xAxisData = response.data[0].date
           xAxisData = xAxisData.map(function (dateStr) {
             var date = new Date(dateStr);
             return date.getMonth() + 1 + "月" + date.getDate() + "日";
           });
-          let loginList = response.data.map((item) => item.name);
+          let loginList = response.data.map((item)  => item.name);
           this.chartObj.myChart2.setOption({
             xAxis: {
-              data: xAxisData,
+              data: xAxisData
             },
             legend: {
-              data: loginList,
+              data: loginList
             },
-            series: response.data,
-          });
+            series: response.data
+          })
         } else {
           console.log(response);
           this.$message.error("获取数据失败");
         }
-      });
+      })
 
       //登录统计信息
-      getOperation().then((response) => {
-        if (response.code == 200) {
+      getOperation().then(response => {
+        if(response.code == 200){
           this.swiperList = response.data;
           console.log(this.swiperList);
           this.$nextTick(() => {
@@ -254,46 +250,46 @@ export default {
           console.log(response);
           this.$message.error("获取数据失败");
         }
-      });
+      })
 
       // 表格统计
-      getTabular().then((response) => {
-        if (response.code == 200) {
-          let tabularList = response.data;
-          // tabularList.push({ name: "多表数量", value: 30 });
-          let labelList = response.data.map((item) => item.name);
+      getTabular().then(response => {
+        if(response.code == 200){
+          let tabularList = response.data
+          tabularList.push({ name: '多表数量', value: 30 })
+          let labelList = response.data.map((item) => item.name)
           this.chartObj.myChart3.setOption({
             yAxis: {
               data: labelList,
             },
             series: [
               {
-                data: response.data,
-              },
-            ],
-          });
+                data: response.data
+              }
+            ]
+          })
         } else {
           console.log(response);
           this.$message.error("获取数据失败");
         }
-      });
+      })
 
       //数据建模数量
-      getData().then((response) => {
-        if (response.code == 200) {
+      getData().then(response => {
+        if(response.code == 200){
           console.log(response.data);
           this.chartObj.myChart4.setOption({
             series: [
               {
-                data: [response.data],
-              },
-            ],
-          });
+                data: [response.data]
+              }
+            ]
+          })
         } else {
           console.log(response);
           this.$message.error("获取数据失败");
         }
-      });
+      })
     },
 
     initChart1() {
@@ -302,262 +298,232 @@ export default {
       let option = {
         color: ["#9370db", "#ffd700", "#00ccff", "#ff6600", "#ff9900"],
         title: {
-          text: "流程统计",
-          left: "left",
+          text: '流程统计',
+          left: 'left',
           textStyle: {
             fontSize: 16,
-            fontWeight: "normal",
-            color: "#696969",
+            fontWeight: 'normal',
+            color: '#696969'
           },
         },
         tooltip: {
-          trigger: "item",
+          trigger: 'item'
         },
         legend: {
-          left: "60%",
-          top: "60%",
+          left: '60%',
+          top: '60%',
         },
         series: [
           {
-            type: "pie",
-            radius: ["40%", "100%"],
+            type: 'pie',
+            radius: ['40%', '100%'],
             avoidLabelOverlap: false,
             itemStyle: {
               // borderRadius: 10,
-              borderColor: "#fff",
-              borderWidth: 2,
+              borderColor: '#fff',
+              borderWidth: 2
             },
-            right: "40%",
-            top: "50%",
+            right: '40%',
+            top: '50%',
             data: [
-              { value: 10, name: "工艺流" },
-              { value: 20, name: "审批流" },
+              { value: 10, name: '工艺流' },
+              { value: 20, name: '审批流' },
             ],
             label: {
               show: false,
-              position: "center",
+              position: 'center'
             },
             labelLine: {
-              show: false,
+              show: false
             },
             emphasis: {
               label: {
                 show: true,
                 fontSize: 20,
-                fontWeight: "bold",
-              },
-            },
-          },
-        ],
+                fontWeight: 'bold'
+              }
+            }
+          }
+        ]
       };
       this.chartObj.myChart1.setOption(option);
     },
 
-    initChart2() {
+    initChart2(){
       this.chartObj.myChart2 = this.$echarts.init(this.$refs.lineChart);
       let option = {
         color: ["#FF88E0", "#9FE080"],
         title: {
-          text: "用户登录统计",
+          text: '用户登录统计',
           textStyle: {
             fontSize: 16,
-            fontWeight: "normal",
-            color: "#696969",
+            fontWeight: 'normal',
+            color: '#696969'
           },
         },
         tooltip: {
-          trigger: "axis",
+          trigger: 'axis'
         },
         legend: {
-          data: ["客户端11", "工具端11"],
+          data: ['客户端11', '工具端11']
         },
         grid: {
-          left: "3%",
-          right: "4%",
-          top: "20%",
-          bottom: "0%",
-          containLabel: true,
+          left: '3%',
+          right: '4%',
+          top: '20%',
+          bottom: '0%',
+          containLabel: true
         },
         xAxis: {
-          type: "category",
+          type: 'category',
           boundaryGap: false,
           data: [
-            "01\nMon",
-            "02\nTue",
-            "03\nWed",
-            "04\nThu",
-            "05\nFri",
-            "06\nSat",
-            "07\nSun",
-            "08\nMon",
-            "09\nTue",
-            "10\nWed",
-            "11\nThu",
-            "12\nFri",
-            "13\nSat",
-            "14\nSun",
-            "15\nMon",
-            "16\nTue",
-            "17\nWed",
-            "18\nThu",
-            "19\nFri",
-            "20\nSat",
-            "21\nSun",
-            "22\nMon",
-            "23\nTue",
-            "24\nWed",
-            "25\nThu",
-            "26\nFri",
-            "27\nSat",
-            "28\nSun",
-            "29\nMon",
-            "30\nTue",
-          ],
+            '01\nMon', '02\nTue', '03\nWed', '04\nThu', '05\nFri', '06\nSat', '07\nSun',
+            '08\nMon', '09\nTue', '10\nWed', '11\nThu', '12\nFri', '13\nSat', '14\nSun',
+            '15\nMon', '16\nTue', '17\nWed', '18\nThu', '19\nFri', '20\nSat', '21\nSun',
+            '22\nMon', '23\nTue', '24\nWed', '25\nThu', '26\nFri', '27\nSat', '28\nSun',
+            '29\nMon', '30\nTue',
+          ]
         },
         yAxis: {
-          type: "value",
+          type: 'value'
         },
         series: [
           {
-            name: "客户端",
-            type: "line",
+            name: '客户端',
+            type: 'line',
             smooth: true,
-            data: [
-              10, 23, 42, 13, 30, 25, 40, 30, 42, 55, 40, 28, 20, 30, 45, 25,
-              20, 30, 40, 33, 35, 40, 46, 31, 13, 34, 20, 10, 36, 43,
-            ],
+            data: [10, 23, 42, 13, 30, 25, 40, 30, 42, 55, 40, 28, 20, 30, 45, 25, 20, 30, 40, 33, 35, 40, 46, 31, 13, 34, 20, 10, 36, 43]
           },
           {
-            name: "工具端",
-            type: "line",
+            name: '工具端',
+            type: 'line',
             smooth: true,
-            data: [
-              20, 30, 29, 40, 55, 33, 30, 26, 36, 45, 50, 34, 38, 25, 28, 43,
-              16, 30, 45, 52, 40, 46, 33, 57, 50, 33, 40, 59, 56, 56,
-            ],
+            data: [20, 30, 29, 40, 55, 33, 30, 26, 36, 45, 50, 34, 38, 25, 28, 43, 16, 30, 45, 52, 40, 46, 33, 57, 50, 33, 40, 59, 56, 56]
           },
-        ],
-      };
+        ]
+      }
       this.chartObj.myChart2.setOption(option);
     },
 
-    initChart3() {
+    initChart3(){
       this.chartObj.myChart3 = this.$echarts.init(this.$refs.gaugeChart);
       let option = {
-        color: ["#00ccff", "#ff6600", "#ff9900", "#9370db", "#ffd700"],
+        color: ["#00ccff", "#ff6600", "#ff9900","#9370db", "#ffd700"],
         title: {
-          text: "表格统计",
-          left: "left",
+          text: '表格统计',
+          left: 'left',
           textStyle: {
             fontSize: 16,
-            fontWeight: "normal",
-            color: "#696969",
+            fontWeight: 'normal',
+            color: '#696969'
           },
         },
         tooltip: {
           trigger: "axis",
           axisPointer: {
-            type: "shadow",
-          },
+            type: "shadow"
+          }
         },
         grid: {
-          left: "0%",
-          right: "3%",
-          top: "20%",
-          bottom: "0%",
-          containLabel: true,
+          left: '0%',
+          right: '3%',
+          top: '20%',
+          bottom: '0%',
+          containLabel: true
         },
         xAxis: {
-          type: "value",
-          nameLocation: "middle",
+          type: 'value',
+          nameLocation: 'middle',
           nameTextStyle: {
-            align: "center",
+            align: 'center'
           },
           splitLine: {
-            show: false,
+            show: false
           },
         },
 
         yAxis: {
-          type: "category",
-          data: ["表单", "表格", "三级联动", "多表数量"],
+          type: 'category',
+          data: ['表单', '表格', '三级联动', '多表数量'],
           inverse: true, // 使类目从右向左排列
         },
 
         series: [
           {
-            type: "bar",
-            barWidth: "18",
-            orientation: "horizontal",
+            type: 'bar',
+            barWidth: '18',
+            orientation: 'horizontal',
             data: [
-              { value: 88, name: "表单" },
-              { value: 66, name: "表格" },
-              { value: 33, name: "三级联动" },
-              { value: 55, name: "多表数量" },
+              { value: 88, name: '表单' },
+              { value: 66, name: '表格' },
+              { value: 33, name: '三级联动' },
+              { value: 55, name: '多表数量' },
             ],
             showBackground: true,
             backgroundStyle: {
-              color: "#F0F8FF",
-            },
-          },
-        ],
-      };
+              color: '#F0F8FF'
+            }
+          }
+        ]
+      }
       this.chartObj.myChart3.setOption(option);
     },
 
-    initChart4() {
+    initChart4(){
       this.chartObj.myChart4 = this.$echarts.init(this.$refs.barChart);
       let option = {
         color: ["#5D84FE"],
         title: {
-          text: "数据建模统计",
+          text: '数据建模统计',
           textStyle: {
             fontSize: 16,
-            fontWeight: "normal",
-            color: "#696969",
+            fontWeight: 'normal',
+            color: '#696969'
           },
         },
         tooltip: {
           trigger: "axis",
           axisPointer: {
-            type: "shadow",
-          },
+            type: "shadow"
+          }
         },
         xAxis: {
-          type: "category",
-          data: ["数据建模"],
+          type: 'category',
+          data: ['数据建模'],
         },
         yAxis: {
-          type: "value",
+          type: 'value',
           min: 0,
           max: 100,
           interval: 20,
           splitLine: {
-            show: false, // 关闭y轴的水平分割线
+            show: false // 关闭y轴的水平分割线
           },
         },
         grid: {
-          left: "5%",
-          right: "5%",
-          top: "30%",
-          bottom: "0%",
-          containLabel: true,
+          left: '5%',
+          right: '5%',
+          top: '30%',
+          bottom: '0%',
+          containLabel: true
         },
         series: [
           {
             data: [20],
-            type: "bar",
-            barWidth: "30", // 设置柱体宽度
+            type: 'bar',
+            barWidth: '30', // 设置柱体宽度
             showBackground: true,
             backgroundStyle: {
-              color: "#E8EFFF",
-            },
-          },
-        ],
-      };
+              color: '#E8EFFF'
+            }
+          }
+        ]
+      }
       this.chartObj.myChart4.setOption(option);
     },
 
+
     /** 导入按钮操作 */
     handleImport() {
       this.upload.title = "用户导入";
@@ -614,6 +580,7 @@ export default {
       return formatDate(new Date());
     },
   },
+
 };
 </script>
 
@@ -621,7 +588,6 @@ export default {
 .home {
   position: relative;
   width: 100%;
-  background-color: #eff2f7;
   /* height: 500px; */
   .info-content {
     width: 100%;
@@ -635,7 +601,7 @@ export default {
       height: 280px;
       margin: auto;
       padding: 20px 15px;
-      box-shadow: 10px 10px 5px #e0e0e0;
+      box-shadow: 10px 10px 5px #E0E0E0;
       background-color: #fff;
       border-radius: 10px;
       .pieChart {
@@ -676,7 +642,7 @@ export default {
       height: 280px;
       margin: auto;
       padding: 20px 15px;
-      box-shadow: 10px 10px 5px #e0e0e0;
+      box-shadow: 10px 10px 5px #E0E0E0;
       background-color: #fff;
       border-radius: 10px;
       margin-right: 30px;
@@ -690,7 +656,7 @@ export default {
       height: 200px;
       margin: auto;
       padding: 20px 15px;
-      box-shadow: 10px 10px 5px #e0e0e0;
+      box-shadow: 10px 10px 5px #E0E0E0;
       background-color: #fff;
       border-radius: 10px;
       margin-top: 20px;
@@ -699,7 +665,7 @@ export default {
       }
       .title {
         font-size: 16px;
-        color: "#696969";
+        color: '#696969'
       }
       .text {
         display: flex;
@@ -743,7 +709,7 @@ export default {
       height: 200px;
       margin: auto;
       padding: 20px 15px;
-      box-shadow: 10px 10px 5px #e0e0e0;
+      box-shadow: 10px 10px 5px #E0E0E0;
       background-color: #fff;
       border-radius: 10px;
       margin-top: 20px;
@@ -757,7 +723,7 @@ export default {
       height: 200px;
       margin: auto;
       padding: 20px 15px;
-      box-shadow: 10px 10px 5px #e0e0e0;
+      box-shadow: 10px 10px 5px #E0E0E0;
       background-color: #fff;
       border-radius: 10px;
       margin-top: 20px;

+ 1 - 1
zkqy-ui/src/views/system/excuteBtnMange/index.vue

@@ -338,7 +338,7 @@
               />
               <span slot="label">
                 <el-tooltip
-                  content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)"
+                  content="控制器中定义的权限字符,如://@PreAuthorize(`@ss.hasPermi('system:user:list')`)"
                   placement="top"
                 >
                   <i class="el-icon-question"></i>

+ 1 - 1
zkqy-ui/src/views/system/menu/index.vue

@@ -327,7 +327,7 @@
               />
               <span slot="label">
                 <el-tooltip
-                  content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)"
+                  content="控制器中定义的权限字符,如://@PreAuthorize(`@ss.hasPermi('system:user:list')`)"
                   placement="top"
                 >
                   <i class="el-icon-question"></i>

+ 1 - 1
zkqy-ui/src/views/system/role/index.vue

@@ -287,7 +287,7 @@
         <el-form-item prop="roleKey">
           <span slot="label">
             <el-tooltip
-              content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)"
+              content="控制器中定义的权限字符,如://@PreAuthorize(`@ss.hasRole('admin')`)"
               placement="top"
             >
               <i class="el-icon-question"></i>

+ 3 - 0
zkqy-ui/src/views/system/tenant/index.vue

@@ -1064,6 +1064,9 @@ export default {
     },
     /** 提交按钮 */
     async submitForm() {
+
+      console.log("租户信息")
+      console.log("租户地址信息:", this.dict.type.system_login_url);
       let valid = await this.$refs.form.validate();
       if (!valid) return;
       if (this.form.tenantParentId.length >= 0) {

+ 2 - 0
zkqy-ui/src/views/system/tenant/tenantIndex.vue

@@ -1174,6 +1174,8 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
+      console.log("租户信息")
+      console.log("租户地址信息:", this.dict.type.system_login_url);
       if (this.form.tenantParentId.length >= 0) {
         // 处理当前租户的上级租户id
         this.form.tenantParentId =

+ 140 - 73
zkqy-ui/src/views/tableMange/components/ClassificationQueryPanel.vue

@@ -5,14 +5,21 @@
       class="inline-large-button mb10"
       icon="el-icon-plus"
       size="mini"
-      @click="addCondition"
-    >
-      添加按钮
+      @click="addCondition">
+      添加
     </el-button>
     <el-table :data="tableData" style="width: 100%">
-      <!-- <el-table-column align="center" label="序号" type="index" width="50">
-      </el-table-column> -->
-      <el-table-column align="center" prop="conditionNotes" label="按钮名称">
+      <el-table-column align="center" label="序号" type="index" width="50"/>
+      <el-table-column align="center" prop="conditionNotes" label="条件名称">
+        <template slot-scope="scope">
+          <el-input
+            v-model="scope.row.conditionName"
+            size="normal"
+            clearable
+          ></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="conditionNotes" label="描述条件">
         <template slot-scope="scope">
           <el-input
             v-model="scope.row.conditionNotes"
@@ -25,58 +32,35 @@
         align="center"
         prop="conditionField"
         label="条件字段"
-        width="100"
-      >
+        width="100">
         <template slot-scope="scope">
-          <el-select
-            v-model="scope.row.conditionField"
-            placeholder="请选择条件字段"
-            clearable
-            filterable
-          >
+          <el-select v-model="scope.row.conditionField" placeholder="请选择条件字段" clearable filterable>
             <el-option
               v-for="item in fieldList"
               :key="item.fieldName"
               :label="item.fieldDescription"
-              :value="item.tableName + '.' + item.fieldName"
-            >
+              :value="item.tableName + '.' + item.fieldName">
               <span class="discribe" style="float: left">{{
-                item.fieldDescription
-              }}</span>
+                  item.fieldDescription
+                }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{
-                item.fieldName
-              }}</span>
+                  item.fieldName
+                }}</span>
             </el-option>
           </el-select>
         </template>
       </el-table-column>
-      <!-- <el-table-column align="center" prop="condition" label="条件">
-        <template slot-scope="scope">
-          <el-select v-model="scope.row.condition" placeholder="请选择">
-            <el-option
-              v-for="item in conditionList"
-              :key="item.label"
-              :label="item.label"
-              :value="item.label"
-            >
-            </el-option>
-          </el-select>
-        </template>
-      </el-table-column> -->
-      <!-- <el-table-column align="center" prop="conditionType" label="类型">
+
+      <el-table-column align="center" prop="conditionType" label="条件类型">
         <template slot-scope="scope">
           <el-select v-model="scope.row.conditionType" clearable filterable>
-            <el-option
-              v-for="item in conditionTypeOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
+            <el-option v-for="item in conditionTypeOptions" :key="item.value" :label="item.label" :value="item.value">
             </el-option>
           </el-select>
         </template>
-      </el-table-column> -->
-      <el-table-column align="center" prop="componentType" label="按钮类型">
+      </el-table-column>
+
+      <el-table-column align="center" prop="componentType" label="显示类型">
         <template slot-scope="scope">
           <el-select v-model="scope.row.componentType" clearable filterable>
             <el-option
@@ -89,7 +73,7 @@
           </el-select>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="componentSize" label="按钮尺寸">
+      <el-table-column align="center" prop="componentSize" label="尺寸">
         <template slot-scope="scope">
           <el-select v-model="scope.row.componentSize" clearable filterable>
             <el-option
@@ -102,7 +86,7 @@
           </el-select>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="componentIcon" label="按钮图标">
+      <el-table-column align="center" prop="componentIcon" label="图标">
         <template slot-scope="scope">
           <el-popover
             placement="bottom-start"
@@ -131,22 +115,20 @@
                 :icon-class="scope.row.componentIcon"
                 style="width: 25px"
               />
-              <i v-else slot="prefix" class="el-icon-search el-input__icon" />
+              <i v-else slot="prefix" class="el-icon-search el-input__icon"/>
             </el-input>
           </el-popover>
         </template>
       </el-table-column>
 
-      <el-table-column
-        align="center"
-        prop="conditionDefaultValue"
-        label="按钮值"
-      >
+      <el-table-column align="center" prop="conditionDefaultValue" label="默认值">
         <template slot-scope="scope">
+          <!--          handleDisabled(scope.row)
+                    :disabled="tableData[scope.$index].componentType='input'"-->
           <el-input v-model="scope.row.conditionDefaultValue"></el-input>
         </template>
       </el-table-column>
-      <el-table-column align="center" prop="sort" label="序">
+      <el-table-column align="center" prop="sort" label="展示顺序">
         <template slot-scope="scope">
           <el-input v-model="scope.row.sort"></el-input>
         </template>
@@ -156,24 +138,51 @@
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-delete"
+            @click="openHandler(scope)"
+          >更多
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
             @click="delHandler(scope.$index)"
-            >删除
+          >删除
           </el-button>
         </template>
       </el-table-column>
     </el-table>
+    <!--  查询条件更多设置弹窗  -->
+    <el-dialog :title="settings.title" :visible.sync="settings.open" width="400px" append-to-body fullscreen>
+      <el-input
+        type="textarea"
+        :rows="8"
+        placeholder="请输入当前下拉框数据来源sql语句,例如SELECT custom_name AS label, custom_no AS `value`, id AS id FROM customer"
+        v-model="tableData[settings.dataIndex].conditionDatasource">
+      </el-input>
+      <!-- 下拉框数据来源(字典、表数据)设置label、value -->
+      <!-- 时间范围(选择到年、月、日 时、分、秒)   -->
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import IconSelect from "@/components/IconSelect";
+
+// mysql 语法校验插件
+// import 'codemirror/theme/ambiance.css'
+// import 'codemirror/lib/codemirror.css'
+// import 'codemirror/addon/hint/show-hint.css'
+
 export default {
   name: "ClassificationQueryPanel",
   props: ["tableFieldList", "classificationDataEcho"],
-  components: { IconSelect },
+  components: {IconSelect},
   data() {
     return {
+      settings: {
+        title: "",
+        open: false,
+        dataIndex: 0,
+      },
       tableData: [],
       fieldList: [],
       conditionList: [
@@ -199,41 +208,57 @@ export default {
         },
       ],
       conditionTypeOptions: [
+        {
+          label: "文本",
+          value: "input",
+        },
         {
           label: "按钮",
           value: "button",
         },
+        {
+          label: "下拉",
+          value: "select",
+        },
+        {
+          label: "单选",
+          value: "radio",
+        },
+        {
+          label: "时间范围",
+          value: "datetimerange",
+        },
       ],
       componentTypeOptions: [
         {
+          label: "主要",
           value: "primary",
-          label: "primary",
         },
         {
+          label: "成功",
           value: "success",
-          label: "success",
         },
         {
+          label: "警告",
           value: "warning",
-          label: "warning",
         },
         {
+          label: "危险",
           value: "danger",
-          label: "danger",
         },
         {
+          label: "信息",
           value: "info",
-          label: "info",
         },
         {
+          label: "文本",
           value: "text",
-          label: "text",
         },
       ],
       componentSizeOptions: [
-        { value: "small", label: "small" },
-        { value: "default", label: "default" },
-        { value: "large", label: "large" },
+        {value: "small", label: "较小"},
+        {value: "default", label: "默认"},
+        {value: "large", label: "较大"},
       ],
     };
   },
@@ -266,7 +291,7 @@ export default {
     myFilterDataEcho: {
       handler(val) {
         if (val) {
-          console.log(val);
+          console.log("valavavalvlavl", val);
           this.tableData = val;
         }
       },
@@ -284,6 +309,24 @@ export default {
     },
   },
   methods: {
+    // 联合查询按钮配置
+    openHandler(scope) {
+      // console.log(scope.$index)
+      // 设置当前选择查询条件的sql语句
+      this.settings.dataIndex = scope.$index;
+      this.settings.open = true
+      this.settings.title = "设置条件-" + scope.row.conditionName
+    },
+    // 处理联合查询,默认值输入框禁用逻辑
+    handleDisabled(row) {
+      console.log("rowrowrow", row)
+      // 如果是文本类型则禁用默认值输入框
+      if (row.componentType == 'input') {
+        console.log("进入", row)
+        return 'disabled';
+      }
+      return false;
+    },
     // 选择图标
     selected(name, row) {
       console.log(name, row);
@@ -293,20 +336,21 @@ export default {
     // 新增条件回调
     addCondition() {
       this.tableData.push({
-        conditionNotes: "", //按钮名称
-        conditionName: "",
+        conditionName: "",  // 名称
+        conditionNotes: "", //  描述信息
         conditionField: "", //条件字段
         // condition: "",
-        conditionType: "button", //类型
+        conditionType: "input", //类型
         conditionDefaultValue: "", //按钮值
-        sort: "", //排序
-        componentType: "", //按钮类型
-        componentsSize: "", //按钮大小
-        componentIcon: "", //按钮图标
+        sort: this.tableData.length + 1, //排序
+        componentType: "primary", //显示类型
+        componentsSize: "default", //尺寸
+        componentIcon: "", //图标
       });
     },
     // 编辑条件回调
-    editHandler() {},
+    editHandler() {
+    },
     // 删除条件回调
     delHandler(index) {
       this.tableData.splice(index, 1);
@@ -320,7 +364,30 @@ export default {
       return JSON.stringify(this.tableData);
     },
   },
-  mounted() {},
+
+  mounted() {
+    const mime = 'text/x-mariadb'
+    // let theme = 'ambiance'//设置主题,不设置的会使用默认主题
+    this.editor = CodeMirror.fromTextArea(this.$refs.mycode, {
+      mode: mysql, // 选择对应代码编辑器的语言,我这边选的是数据库,根据个人情况自行设置即可
+      indentWithTabs: true,
+      smartIndent: true,
+      lineNumbers: true,
+      matchBrackets: true,
+      // theme: 'base16-light',
+      // autofocus: true,
+      extraKeys: {'Ctrl': 'autocomplete'}, // 自定义快捷键
+      hintOptions: {// 自定义提示选项
+        tables: {
+          users: ['1112', '123123', '124124'],
+          countries: ['124', '124124', '1']
+        }
+      }
+    })
+    this.editor.on('cursorActivity', () => {
+      this.editor.showHint()
+    })
+  },
 };
 </script>
 

+ 11 - 0
zkqy-ui/src/views/tableMange/components/mysql.js

@@ -0,0 +1,11 @@
+// import 'codemirror/theme/ambiance.css'
+// import 'codemirror/lib/codemirror.css'
+// import 'codemirror/addon/hint/show-hint.css'
+//
+// const CodeMirror = require('codemirror/lib/codemirror')
+// require('codemirror/addon/edit/matchbrackets')
+// require('codemirror/addon/selection/active-line')
+// require('codemirror/mode/sql/sql')
+// require('codemirror/addon/hint/show-hint')
+// require('codemirror/addon/hint/sql-hint')
+// import sqlFormatter from 'sql-formatter'

+ 112 - 83
zkqy-ui/src/views/tableMange/index.vue

@@ -27,11 +27,11 @@
               :value="item.tableName"
             >
               <span class="discribe" style="float: left">{{
-                item.tableComment
-              }}</span>
+                  item.tableComment
+                }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{
-                item.tableName
-              }}</span>
+                  item.tableName
+                }}</span>
             </el-option>
           </el-select>
           <!-- <el-form
@@ -107,7 +107,7 @@
                     <span style="float: left">{{ item.tableComment }}</span>
                     <span
                       style="float: right; color: #8492a6; font-size: 13px"
-                      >{{ item.tableName }}</span
+                    >{{ item.tableName }}</span
                     >
                   </el-option>
                 </el-select>
@@ -181,7 +181,7 @@
             </el-table-column> -->
             <el-table-column align="center" prop="isShow" label="是否显示">
               <template slot-scope="scope">
-                <el-switch v-model="scope.row.isShow"> </el-switch>
+                <el-switch v-model="scope.row.isShow"></el-switch>
               </template>
             </el-table-column>
             <el-table-column
@@ -190,12 +190,12 @@
               label="是否包含查询"
             >
               <template slot-scope="scope">
-                <el-switch v-model="scope.row.isSearch"> </el-switch>
+                <el-switch v-model="scope.row.isSearch"></el-switch>
               </template>
             </el-table-column>
             <el-table-column align="center" prop="isExport" label="是否导出">
               <template slot-scope="scope">
-                <el-switch v-model="scope.row.isExport"> </el-switch>
+                <el-switch v-model="scope.row.isExport"></el-switch>
               </template>
             </el-table-column>
             <!-- <el-table-column
@@ -329,17 +329,20 @@
                 </el-form-item>
                 <el-form-item label="排序方式" v-show="formData.orderByColumn">
                   <el-radio v-model="formData.isAsc" :label="false"
-                    >升序</el-radio
+                  >升序
+                  </el-radio
                   >
                   <el-radio v-model="formData.isAsc" :label="true"
-                    >降序</el-radio
+                  >降序
+                  </el-radio
                   >
                 </el-form-item>
                 <el-form-item>
                   <el-button size="mini" @click="previewHandle">预览</el-button>
                   <el-button size="mini" type="primary" @click="createHandle">{{
-                    tId ? "确认修改" : "确认创建"
-                  }}</el-button>
+                      tId ? "确认修改" : "确认创建"
+                    }}
+                  </el-button>
                 </el-form-item>
               </el-form>
             </el-card>
@@ -398,7 +401,7 @@
                           type="text"
                           icon="el-icon-edit"
                           @click="handleUpdateStat(scope.row)"
-                          >修改
+                        >修改
                         </el-button>
                       </el-dropdown-item>
                       <el-dropdown-item>
@@ -407,7 +410,7 @@
                           type="text"
                           icon="el-icon-delete"
                           @click="handleDeleteStat(scope.row)"
-                          >删除
+                        >删除
                         </el-button>
                       </el-dropdown-item>
                     </el-dropdown-menu>
@@ -488,7 +491,7 @@
 
       <el-row :gutter="10" class="mb8">
         <el-col :span="18">
-          <el-input placeholder="请输入" clearable />
+          <el-input placeholder="请输入" clearable/>
         </el-col>
 
         <el-col :span="6" class="previewbtn">
@@ -497,10 +500,12 @@
             icon="el-icon-search"
             size="small"
             @click="() => {}"
-            >搜索</el-button
+          >搜索
+          </el-button
           >
           <el-button icon="el-icon-refresh" size="small" @click="() => {}"
-            >重置</el-button
+          >重置
+          </el-button
           >
         </el-col>
       </el-row>
@@ -513,7 +518,7 @@
             icon="el-icon-plus"
             size="mini"
             @click="() => {}"
-            >新增
+          >新增
           </el-button>
         </el-col>
         <el-col :span="1.5">
@@ -524,7 +529,7 @@
             size="mini"
             :disabled="false"
             @click="() => {}"
-            >修改
+          >修改
           </el-button>
         </el-col>
         <el-col :span="1.5">
@@ -535,12 +540,12 @@
             size="mini"
             :disabled="false"
             @click="() => {}"
-            >删除
+          >删除
           </el-button>
         </el-col>
         <el-col :span="1.5">
           <el-button plain icon="el-icon-upload2" size="mini" @click="() => {}"
-            >导入
+          >导入
           </el-button>
         </el-col>
         <el-col :span="1.5">
@@ -550,7 +555,7 @@
             icon="el-icon-download"
             size="mini"
             @click="() => {}"
-            >导出
+          >导出
           </el-button>
         </el-col>
         <!-- <right-toolbar
@@ -601,21 +606,26 @@
               </el-button>
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item
-                  ><el-button
+                >
+                  <el-button
                     size="mini"
                     type="text"
                     icon="el-icon-edit"
                     @click="() => {}"
-                    >修改</el-button
-                  ></el-dropdown-item
+                  >修改
+                  </el-button
+                  >
+                </el-dropdown-item
                 >
                 <el-dropdown-item
-                  ><el-button
+                >
+                  <el-button
                     size="mini"
                     type="text"
                     icon="el-icon-delete"
                     @click="() => {}"
-                    >删除</el-button
+                  >删除
+                  </el-button
                   >
                 </el-dropdown-item>
               </el-dropdown-menu>
@@ -634,8 +644,8 @@
         <span>
           <el-button @click="isShowPreview = false">关闭</el-button>
           <el-button type="primary" @click="createHandle">{{
-            tId ? "确认修改" : "确认创建"
-          }}</el-button>
+              tId ? "确认修改" : "确认创建"
+            }}</el-button>
         </span>
       </template>
     </el-dialog>
@@ -659,11 +669,11 @@
               :value="item.tableName + '.' + item.fieldName"
             >
               <span class="discribe" style="float: left; margin-right: 5px"
-                >{{ isShowTableName }}
+              >{{ isShowTableName }}
               </span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{
-                item.fieldName
-              }}</span>
+                  item.fieldName
+                }}</span>
             </el-option>
           </el-select>
         </el-form-item>
@@ -692,7 +702,7 @@
           v-if="staictitle == '修改统计数据字段'"
           type="primary"
           @click="upadtaData"
-          >确 定</el-button
+        >确 定</el-button
         >
 
         <el-button v-else type="primary" @click="addData">确 定</el-button>
@@ -713,23 +723,23 @@ import {
   updateStatistic,
   insertByDefaultBtn,
 } from "@/api/tablelist/commonTable";
-import { getDicts } from "@/api/system/dict/data";
+import {getDicts} from "@/api/system/dict/data";
 import {
   getFormName,
   getListName,
   dragTablePreview,
 } from "@/api/dragform/form.js";
-import { getTableInfo, editTable } from "@/api/system/table.js";
-import { addDragTable } from "@/api/tablelist/commonTable.js";
-import { getParticMenu, updateMenu } from "@/api/system/menu.js";
-import { getMenuList, addMenu, tbnHasPerms } from "@/api/menu.js";
+import {getTableInfo, editTable} from "@/api/system/table.js";
+import {addDragTable} from "@/api/tablelist/commonTable.js";
+import {getParticMenu, updateMenu} from "@/api/system/menu.js";
+import {getMenuList, addMenu, tbnHasPerms} from "@/api/menu.js";
 import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
-import { mapState } from "vuex";
+import {mapState} from "vuex";
 import Sortable from "sortablejs";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import { v4 as uuidv4 } from "uuid";
-import { listBtn } from "@/api/system/btn";
+import {v4 as uuidv4} from "uuid";
+import {listBtn} from "@/api/system/btn";
 import StyleFormPanel from "./components/StyleFormPanel.vue";
 import DataFilterPanel from "./components/DataFilterPanel.vue";
 import ClassificationQueryPanel from "./components/ClassificationQueryPanel.vue";
@@ -851,19 +861,19 @@ export default {
       },
       rules: {
         menuName: [
-          { required: true, message: "请输入菜单名称", trigger: "blur" },
+          {required: true, message: "请输入菜单名称", trigger: "blur"},
         ],
         routePath: [
-          { required: true, message: "请选择路由", trigger: "change" },
+          {required: true, message: "请选择路由", trigger: "change"},
         ],
         timeFormate: [
-          { required: true, message: "请选择时间格式", trigger: "change" },
+          {required: true, message: "请选择时间格式", trigger: "change"},
         ],
         primaryKey: [
-          { required: true, message: "请选择表格主键", trigger: "blur" },
+          {required: true, message: "请选择表格主键", trigger: "blur"},
         ],
         fieldDescription: [
-          { required: true, message: "请输入字段描述", trigger: "blur" },
+          {required: true, message: "请输入字段描述", trigger: "blur"},
         ],
       },
       menus: [], //路由列表数据
@@ -1015,7 +1025,7 @@ export default {
       this.btnTemplate.forEach((item) => {
         item.children.forEach((i) => {
           if (i.btnType == "UPDATE" || i.btnType == "DELETE") {
-            let btnParams = { commonFieldData: [], conditionData: [] };
+            let btnParams = {commonFieldData: [], conditionData: []};
             btnParams.conditionData.push({
               fieldName: primaryKey,
               fieldValue: "",
@@ -1182,14 +1192,15 @@ export default {
       this.$refs.mychild.pageList(
         row == undefined
           ? {
-              limit: this.queryParams.pageSize,
-              page: this.queryParams.pageNum,
-            }
+            limit: this.queryParams.pageSize,
+            page: this.queryParams.pageNum,
+          }
           : row
       );
     },
     // 多选框改变回调
-    checkedChangeHandle(val) {},
+    checkedChangeHandle(val) {
+    },
     // 获取所有表格
     async getAllTable() {
       let data = {
@@ -1347,22 +1358,22 @@ export default {
           let isNeedUsername = sqlType == "oracle" ? this.username + "." : "";
           tableArr.push(
             temp.relationType +
-              " " +
-              isNeedUsername +
-              prefix +
-              temp.relationTable +
-              asOrSpace +
-              temp.relationTable +
-              " ON " +
-              prefix +
-              temp.relationTable +
-              "." +
-              temp.relationFieldName +
-              " = " +
-              prefix +
-              temp.tableName +
-              "." +
-              temp.fieldName
+            " " +
+            isNeedUsername +
+            prefix +
+            temp.relationTable +
+            asOrSpace +
+            temp.relationTable +
+            " ON " +
+            prefix +
+            temp.relationTable +
+            "." +
+            temp.relationFieldName +
+            " = " +
+            prefix +
+            temp.tableName +
+            "." +
+            temp.fieldName
           );
         }
         // if (temp.relationFieldList.length) {
@@ -1376,13 +1387,13 @@ export default {
       if (isNotInclude) {
         fieldArr.push(
           prefix +
-            isNotInclude.tableName +
-            "." +
-            isNotInclude.fieldName +
-            asOrSpace +
-            isNotInclude.tableName +
-            "_" +
-            isNotInclude.fieldName
+          isNotInclude.tableName +
+          "." +
+          isNotInclude.fieldName +
+          asOrSpace +
+          isNotInclude.tableName +
+          "_" +
+          isNotInclude.fieldName
         );
       }
     },
@@ -1625,6 +1636,7 @@ export default {
 
     // 处理配置的条件查询按钮数据
     getBtnData(searchArr = []) {
+      // 按钮条件list
       let classificationData =
         this.$refs.classificationQueryRef.getConditions();
       let res = searchArr
@@ -1635,11 +1647,11 @@ export default {
             conditionType: "SuperQuery",
           };
         })
-        .filter((item) => {
-          return !classificationData.some((v) => {
-            return v.conditionField == item.conditionField;
-          });
-        });
+      // .filter((item) => {
+      //   return !classificationData.some((v) => {
+      //     return v.conditionField == item.conditionField;
+      //   });
+      // });
       return [...res, ...classificationData];
     },
     // 创建回调
@@ -1968,9 +1980,9 @@ export default {
           this.menus,
           {}
         );
-        //处理按钮回显数据
+        //处理联合查询回显数据
         this.classificationDataEcho = res.data.searchFieldList.filter(
-          (item) => item.conditionType == "button"
+          (item) => item.conditionType != "SuperQuery" && item.conditionType != "DefaultQuery"
         );
         if (!this.formData.routePath) {
           this.$message.warning("该表格菜单路由已经删除,请重新配置");
@@ -2092,7 +2104,7 @@ export default {
 
     // 获取按钮组数据
     async getBtnList() {
-      let res = await listBtn({ isEnablePaging: false, btnParentId: 0 });
+      let res = await listBtn({isEnablePaging: false, btnParentId: 0});
       // this.btnGroupOption=res.rows
       // this.btnGroupOptions = res.rows.filter((item) => !item.whetherBind);
       this.btnGroupOptions = res.rows.filter((item) => {
@@ -2103,7 +2115,8 @@ export default {
       });
     },
   },
-  created() {},
+  created() {
+  },
   async mounted() {
     this.getBtnTemplate();
     this.getAllTable();
@@ -2126,6 +2139,7 @@ export default {
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
 .ipt {
   height: 36px;
   line-height: 36px;
@@ -2139,6 +2153,7 @@ export default {
   display: inline-block;
   border-radius: 4px;
 }
+
 .isNullDesc {
   border-color: #ff4949 !important;
 }
@@ -2146,27 +2161,34 @@ export default {
 .ipt:focus {
   border-color: #1890ff;
 }
+
 ::v-deep .right_card {
   min-height: 500px !important;
 }
+
 ::v-deep .vue-treeselect--has-value .vue-treeselect__input {
   vertical-align: middle !important;
 }
+
 .menudata {
   width: 70% !important;
 }
+
 .edit {
   width: 30% !important;
 }
+
 .mb10 {
   margin-top: 10px;
 }
+
 .cardBox {
   display: flex;
   align-content: space-between;
   flex-wrap: wrap;
   align-content: flex-start;
 }
+
 .card {
   /* width:15%; */
   height: 150px;
@@ -2174,6 +2196,7 @@ export default {
   margin-bottom: 10px;
   margin-right: 15px;
   min-width: 180px;
+
   .title {
     /* width:20%; */
     font-size: 18px;
@@ -2182,6 +2205,7 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
   }
+
   .description {
     width: 70%;
     font-size: 13px;
@@ -2194,22 +2218,27 @@ export default {
     word-break: break-all;
     float: left;
   }
+
   .type {
     float: right;
     margin-top: 40px;
+
     .statisticType {
       font-size: 18px;
     }
   }
+
   .count {
     font-size: 25px;
   }
 }
+
 .mb8 {
   ::v-deep .el-col-18 {
     width: 30% !important;
     min-width: 220px !important;
   }
+
   ::v-deep .previewbtn {
     min-width: 190px !important;
   }

+ 72 - 137
zkqy-ui/src/views/tablelist/commonTable/queryfrom.vue

@@ -1,57 +1,34 @@
 <template>
   <div>
-    <!-- <div class="cardBox" v-show="showCount" >
-      <el-card
-        shadow="hover"
-        :body-style="{ padding: '20px' }"
-        class="card"
-        v-for="(item, index) in statisticList"
-        :key="index"
-      >
-        <el-tooltip
-          class="item"
-          effect="dark"
-          :content="item.statisticTitle ? item.statisticTitle : item.statisticDescription"
-          placement="top-start"
-        >
-          <div class="title">{{ item.statisticTitle ? item.statisticTitle : item.statisticDescription }}</div>
-        </el-tooltip>
-
-        <div class="type">
-          <div class="count">{{ item.result }}</div>
-        </div>
-      </el-card>
-    </div> -->
-    <cardcountpanel :showCount="showCount" :statisticList="statisticList" />
-    <el-form
-      :model="queryParams.queryMap"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      label-width="68px"
-      @submit.native.prevent
-      v-show="showSearch"
-    >
+    <!--    <div class="cardBox" v-show="showCount">-->
+    <!--      <el-card-->
+    <!--        shadow="hover"-->
+    <!--        :body-style="{ padding: '20px' }"-->
+    <!--        class="card"-->
+    <!--        v-for="(item, index) in statisticList"-->
+    <!--        :key="index">-->
+    <!--        <el-tooltip-->
+    <!--          class="item"-->
+    <!--          effect="dark"-->
+    <!--          :content="item.statisticTitle ? item.statisticTitle : item.statisticDescription"-->
+    <!--          placement="top-start">-->
+    <!--          <div class="title">{{ item.statisticTitle ? item.statisticTitle : item.statisticDescription }}</div>-->
+    <!--        </el-tooltip>-->
+    <!--        <div class="type">-->
+    <!--          <div class="count">{{ item.result }}</div>-->
+    <!--        </div>-->
+    <!--      </el-card>-->
+    <!--    </div>-->
+    <cardcountpanel :showCount="showCount" :statisticList="statisticList"/>
+    <el-form :model="queryParams.queryMap" ref="queryForm" size="small" :inline="true"
+             @submit.native.prevent v-show="showSearch">
       <el-form-item label="超级查询">
-        <el-input
-          v-model="queryParams.queryMap.queryCriteriaValue"
-          placeholder="请输入"
-          @keyup.enter.native="handleQuery"
-          clearable
-        />
+        <el-input v-model="queryParams.queryMap.queryCriteriaValue" placeholder="请输入"
+                  @keyup.enter.native="handleQuery" clearable/>
       </el-form-item>
-
       <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-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-item>
 
       <!--   不加载初始数据   -->
@@ -59,112 +36,58 @@
         <!--      条件循环-->
         <span v-for="(item, index) in formVals" :key="index">
           <!--      input框循环-->
-          <span
-            v-if="item.conditionType == 'input'"
-            style="width: 500px; height: 500px"
-          >
-            <el-form-item
-              :label="item.conditionName"
-              :prop="item.conditionField"
-            >
-              <el-input
-                v-model="queryParams.queryMap[item.conditionField]"
-                :placeholder="
-                  item.conditionNotes == null ? '请输入' : item.conditionNotes
-                "
-                @keyup.enter.native="handleQuery"
-                clearable
-              />
+          <span v-if="item.conditionType == 'input'">
+            <el-form-item :label="item.conditionName" :label-width="calculateLabelWidth(item.conditionName)"
+                          :prop="item.conditionField">
+              <el-input v-model="queryParams.queryMap[item.conditionField]"
+                        :placeholder=" item.conditionNotes == null ? '请输入' : item.conditionNotes"
+                        @keyup.enter.native="handleQuery" clearable/>
             </el-form-item>
           </span>
           <!--      button按钮循环-->
-          <span
-            v-if="item.conditionType == 'button'"
-            style="width: 500px; height: 500px"
-          >
-            <el-form-item
-              :label="item.conditionName"
-              :prop="item.conditionField"
-            >
-              {{
-                (queryParams.queryMap[item.conditionField] =
-                  item.conditionDefaultValue)
-              }}
+          <span v-if="item.conditionType == 'button'" style="width: 500px; height: 500px">
+            <el-form-item :label="item.conditionName" :prop="item.conditionField">
+              {{ (queryParams.queryMap[item.conditionField] = item.conditionDefaultValue) }}
               <el-button @keyup.enter.native="handleQuery" @click="handleQuery">
                 {{ item.conditionNotes == null ? "按钮" : item.conditionNotes }}
               </el-button>
             </el-form-item>
           </span>
           <!--      select下拉框循环-->
-          <span
-            v-if="item.conditionType == 'select'"
-            style="width: 500px; height: 500px"
-          >
-            <el-form-item
-              :label="item.conditionName"
-              :prop="item.conditionField"
-            >
-              <el-select
-                v-model="queryParams.queryMap[item.conditionField]"
-                :placeholder="
-                  item.conditionNotes == null ? '请选择' : item.conditionNotes
-                "
-                clearable
-                filterable
-              >
-                <el-option
-                  v-for="(i, index) in item.dropDownList"
-                  :key="index"
-                  :label="i.fieldName"
-                  :value="i.fieldKey"
-                >
+          <span v-if="item.conditionType == 'select'" style="width: 500px; height: 500px">
+            <el-form-item :label="item.conditionName" :prop="item.conditionField">
+              <el-select v-model="queryParams.queryMap[item.conditionField]"
+                         :placeholder=" item.conditionNotes == null ? '请选择' : item.conditionNotes" clearable
+                         filterable>
+                <el-option v-for="(i, index) in item.dropDownList" :key="index" :label="i.fieldName"
+                           :value="i.fieldKey">
                 </el-option>
               </el-select>
-
               <!-- <el-option
-            v-for="item in options"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value">
-          </el-option> -->
+                v-for="item in options"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option> -->
             </el-form-item>
           </span>
-          <!--      radio单选框循环-->
-          <span
-            v-if="item.conditionType == 'radio'"
-            style="width: 500px; height: 500px"
-          >
+          <!--      radio单选框循环 -->
+          <span v-if="item.conditionType == 'radio'" style="width: 500px; height: 500px">
             <el-form-item :prop="item.conditionField">
-              <el-button
-                :type="item.componentType"
-                :icon="item.componentIcon"
-                :size="item.componentSize"
-                @click="buttonClick(item)"
-              >
-                {{ item.conditionName }}</el-button
-              >
+              <el-button :type="item.componentType" :icon="item.componentIcon"
+                         :size="item.componentSize" @click="buttonClick(item)">{{
+                  item.conditionName
+                }}</el-button>
             </el-form-item>
           </span>
           <!--      time时间范围  -->
-          <span
-            v-if="item.conditionType == 'between'"
-            style="width: 500px; height: 500px"
-          >
-            <el-form-item
-              :label="item.conditionName"
-              :prop="item.conditionField"
-            >
+          <span v-if="item.conditionType == 'between'" style="width: 500px; height: 500px">
+            <el-form-item :label="item.conditionName" :prop="item.conditionField">
               <!--  item.componentType 使用某种组件
-        year/month/date/dates/months/years week/datetime/datetimerange/ daterange/monthrange-->
-              <el-date-picker
-                v-model="queryParams.queryMap[item.conditionField]"
-                :type="item.componentType"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                value-format="yyyy-MM-DD HH:mm:ss"
-                :default-time="['12:00:00']"
-              >
+                    year/month/date/dates/months/years week/datetime/datetimerange/ daterange/monthrange-->
+              <el-date-picker v-model="queryParams.queryMap[item.conditionField]" :type="item.componentType"
+                              range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
+                              value-format="yyyy-MM-DD HH:mm:ss" :default-time="['12:00:00']">
               </el-date-picker>
             </el-form-item>
           </span>
@@ -176,6 +99,7 @@
 
 <script>
 import cardcountpanel from "../components/cardCountPanel.vue";
+
 export default {
   name: "queryfrom",
   props: {
@@ -193,7 +117,7 @@ export default {
       type: Array,
     },
   },
-  components: { cardcountpanel },
+  components: {cardcountpanel},
   data() {
     return {
       // 时间范围临时存储
@@ -254,6 +178,12 @@ export default {
     this.$emit("getList", this.queryParams);
   },
   methods: {
+    // 计算form宽度-label
+    calculateLabelWidth(font) {
+      // 一个汉字为20px宽度
+      console.log("当前form中label宽度:", 20 * font.length);
+      return 20 * font.length;
+    },
     // radio 点击事件调用getList
     buttonClick(tem) {
       // 调用父组件中的getlist    待处理
@@ -299,12 +229,14 @@ export default {
   flex-wrap: wrap;
   align-content: flex-start;
 }
+
 .card {
   /* width:15%; */
   flex-basis: 15%;
   margin-bottom: 10px;
   margin-right: 15px;
   min-width: 130px;
+
   .title {
     /* width:20%; */
     font-size: 18px;
@@ -313,6 +245,7 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
   }
+
   .description {
     width: 70%;
     font-size: 13px;
@@ -325,10 +258,12 @@ export default {
     word-break: break-all;
     float: left;
   }
+
   .type {
     float: right;
     margin-top: 10px;
   }
+
   .count {
     font-size: 30px;
   }

+ 21 - 55
zkqy-ui/src/views/tablelist/components/cardCountPanel.vue

@@ -1,77 +1,41 @@
 <template>
   <div>
     <div class="cardBox" v-show="showCount">
-      <el-card
-        shadow="hover"
-        :body-style="{ padding: '20px' }"
-        class="card"
-        v-for="(item, index) in statisticList"
-        :key="index"
-      >
-        <el-tooltip
-          class="item"
-          effect="dark"
-          :content="
-            item.statisticTitle
-              ? item.statisticTitle
-              : item.statisticDescription
-          "
-          placement="top-start"
-        >
+      <el-card shadow="hover" :body-style="{ padding: '20px' }" class="card" v-for="(item, index) in statisticList"
+               :key="index">
+        <el-tooltip class="item" effect="dark"
+                    :content=" item.statisticTitle ? item.statisticTitle : item.statisticDescription"
+                    placement="top-start">
           <div class="title">
             <span class="left">{{
-              item.statisticTitle
-                ? item.statisticTitle
-                : item.statisticDescription
-            }}</span>
+                item.statisticTitle ? item.statisticTitle : item.statisticDescription
+              }}</span>
             <span class="right">{{ item.result }}</span>
           </div>
-        </el-tooltip>
-
-        <!-- <div class="type">
-          <div class="count"></div>
-        </div> -->
-      </el-card>
+        </el-tooltip><!-- <div class="type"> <div class="count"></div> </div> --></el-card>
     </div>
   </div>
 </template>
-
-<script>
-export default {
+<script>export default {
   name: "cardcountpanel",
-  props: {
-    showCount: {
-      type: Boolean,
-    },
-    statisticList: {
-      type: Array,
-    },
-  },
+  props: {showCount: {type: Boolean,}, statisticList: {type: Array,},},
   data() {
     return {};
   },
   methods: {},
-};
-</script>
-
-<style lang="scss" scoped>
-.cardBox {
-  /* display: flex;
-  align-content: space-between;
-  flex-wrap: wrap;
-  align-content: flex-start; */
+};</script>
+<style lang="scss"
+       scoped>.cardBox { /* display: flex; align-content: space-between; flex-wrap: wrap; align-content: flex-start; */
   display: flex;
 }
+
 .card {
-  width: 100%;
-  /* flex-basis: 15%; */
+  width: 100%; /* flex-basis: 15%; */
   margin-bottom: 10px;
   margin-right: 15px;
   max-width: 200px;
-  .title {
-    /* width:20%; */
-    /* display: flex; */
-    /* align-content: space-between; */
+
+  .title { /* width:20%; *//* display: flex; *//* align-content: space-between; */
     font-size: 18px;
     margin-bottom: 5px;
     white-space: nowrap;
@@ -88,6 +52,7 @@ export default {
       font-weight: 800;
     }
   }
+
   .description {
     width: 70%;
     font-size: 13px;
@@ -100,12 +65,13 @@ export default {
     word-break: break-all;
     float: left;
   }
+
   .type {
     float: right;
     margin-top: 10px;
   }
+
   .count {
     font-size: 30px;
   }
-}
-</style>
+}</style>