Kaynağa Gözat

修改数据底座相关

zhaoke 2 yıl önce
ebeveyn
işleme
cf5436a837

+ 28 - 32
src/components/Table/index.vue

@@ -6,12 +6,8 @@
       </div>
       <template v-if="tableData.length">
         <div>
-          <el-table  v-el-table-infinite-scroll="load" :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : (minHeight - 8 + 'vh')" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
-            <el-table-column
-              v-if="selectionEnable"
-              type="selection"
-              width="35"
-            />
+          <el-table v-el-table-infinite-scroll="load" :data="filteredTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" stripe :show-summary="showSummary" border ref="table" :height="tableHeight ? tableHeight : (minHeight - 8 + 'vh')" class="table infinite-list" style="width: 100%; overflow: auto" @select="selectHandler">
+            <el-table-column v-if="selectionEnable" type="selection" width="35" />
             <el-table-column v-for="(item, index) in tableColsCopy" :sortable="item.needSort ? true : false" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip">
               <template #header>
                 <span class="colTips">
@@ -231,7 +227,7 @@ export default {
     };
   },
   computed: {
-    dataTableContentStyle() {
+    dataTableContentStyle () {
       const style = {}
       if (this.minHeight) {
         style['min-height'] = this.minHeight
@@ -286,21 +282,21 @@ export default {
   mounted () {
     this.getQuery();
   },
-  updated() {
+  updated () {
     this.$refs['table']?.doLayout()
   },
   methods: {
-    load(){
+    load () {
       console.log('分页')
     },
-    changeSelect(data){
+    changeSelect (data) {
       if (this.tableForm[data] === '') {
         this.tableForm[data] = null
       }
       this.tableForm[this.tableOptions[data][0].setvalue] = this.tableForm[data];
       // console.log(this.tableForm)
     },
-    inputChangeHandler(data) {
+    inputChangeHandler (data) {
       if (this.tableForm[data] === '') {
         this.tableForm[data] = null
       }
@@ -368,11 +364,11 @@ export default {
       }
     },
     // 表格勾选
-    toggleRowSelection(row, isSelected) {
+    toggleRowSelection (row, isSelected) {
       this.$refs['table'].toggleRowSelection(row, isSelected)
     },
     // 表格初始勾选
-    selectTableRows(tableData, selectFlagName) {
+    selectTableRows (tableData, selectFlagName) {
       tableData.forEach(row => {
         this.$refs['table'].toggleRowSelection(row, !!row[selectFlagName])
       })
@@ -518,13 +514,13 @@ export default {
       //   this.tableType = "add";
       //   this.tableTitle = "新增";
       //   this.tableForm = {};
-      if(this.isDialog ){
+      if (this.isDialog) {
         this.flag = true;
         this.tableType = "add";
         this.tableTitle = "新增";
         this.tableForm = {};
       }
-      else{
+      else {
         this.$emit("handleAdd");
       }
 
@@ -532,25 +528,25 @@ export default {
     },
     //表格-编辑
     async handleEdit (row) {
-      if(this.isDialog) {
+      if (this.isDialog) {
         if (this.editId) {
-          let data  = await this.queryOriginRow(this.editId, row.queryTemplateColumnSetID)
-          this.tableForm =  JSON.parse(JSON.stringify(data))
+          let data = await this.queryOriginRow(this.editId, row.queryTemplateColumnSetID)
+          this.tableForm = JSON.parse(JSON.stringify(data))
           // this.tableForm =this.tableForm;
           // Object.entries(tableForm).forEach(([key, value]) => {
           //   this.tableForm[key] = value
           // })
         } else {
-          this.tableForm =  JSON.parse(JSON.stringify(row));
+          this.tableForm = JSON.parse(JSON.stringify(row));
         }
         this.flag = true;
         this.tableType = "edit";
         this.tableTitle = "编辑";
-      } else{
-        this.$emit("handleEdit",row);
+      } else {
+        this.$emit("handleEdit", row);
       }
     },
-    async queryOriginRow(editId, queryTemplateColumnSetID) {
+    async queryOriginRow (editId, queryTemplateColumnSetID) {
       try {
         const { code, returnData } = await Query({
           id: editId,
@@ -566,7 +562,7 @@ export default {
       }
     },
     //表格-跳转
-    handleHerf(row){
+    handleHerf (row) {
       alert('跳转')
     },
     // 新增/编辑-确认
@@ -597,25 +593,25 @@ export default {
       this.generalDataReception(this.tableObj);
     },
     // 表格-跳转列设置页
-    handleColumnSet(row) {
+    handleColumnSet (row) {
       this.$router.push({
-        path: '/systemSettings/queryTemplateChild',
+        path: '/dataBase/queryTemplateChild',
         query: {
           queryTemplateID: row.queryTemplateID
         }
       })
     },
     // 表格-跳转数据项设置页
-    handleItemSet(row) {
+    handleItemSet (row) {
       this.$router.push({
-        path: '/systemSettings/datastructureChild',
+        path: '/dataBase/datastructureChild',
         query: {
           dataStructureID: row.dataStructureID
         }
       })
     },
     // 表格-选中行
-    selectHandler(selection, row) {
+    selectHandler (selection, row) {
       this.$emit('selection-change', selection, row)
     }
   },
@@ -648,8 +644,8 @@ export default {
         font-weight: bold;
         color: #101116;
         > .el-checkbox {
-        display: none;
-      }
+          display: none;
+        }
       }
       .has-gutter {
         tr {
@@ -710,7 +706,7 @@ export default {
     .hrefBtn {
       width: 48px;
       height: 24px;
-      background: #6F81BC;
+      background: #6f81bc;
       box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.06);
       border-radius: 4px;
       display: flex;
@@ -729,7 +725,7 @@ export default {
       }
     }
     .hd-td {
-      .hd-tr{
+      .hd-tr {
         display: flex;
         justify-content: center;
         flex-direction: row;

+ 0 - 18
src/router/routes/routes-file-four.js

@@ -121,24 +121,6 @@ const systemManagementRoutes = {
       srcer: require('@/assets/nav/ic_setting_top_check.png'),
       component: () => import('@/views/systemManagement/dataBases/views/queryTemplate/queryTemplate'),
     },
-    {
-      path: '/dataBase/queryTemplateadd',
-      name: 'queryTemplateadd',
-      component: () => import('@/views/systemManagement/dataBases/views/queryTemplate/queryTemplateadd'),
-      meta: { title: '新增查询模板' },
-      hidden: false,
-      isAlone: true,
-      src: require('@/assets/nav/ic_setting_top@2x.png')
-    },
-    {
-      path: '/dataBase/queryTemplateedit',
-      name: 'queryTemplateedit',
-      component: () => import('@/views/systemManagement/dataBases/views/queryTemplate/queryTemplateedit'),
-      meta: { title: '编辑查询模板' },
-      hidden: false,
-      isAlone: true,
-      src: require('@/assets/nav/ic_setting_top@2x.png')
-    },
     {
       path: '/dataBase/queryTemplateChild',
       name: 'queryTemplateChild',

+ 3 - 3
src/views/systemManagement/dataBases/views/serviceManagement/serviceHome.vue

@@ -120,8 +120,8 @@
               </el-row>
             </el-form>
           </main>
-          <div class="foot">
-            <el-button size="medium" type="primary" class="r25 r26" @click="createSubmitHandler">提交</el-button>
+          <div class="foot right t30">
+            <el-button size="medium" type="primary" class="r25 r24 r26" @click="createSubmitHandler">提交</el-button>
             <el-button size="medium" class="r26" @click="hideCreateDialog">取消</el-button>
           </div>
         </div>
@@ -193,7 +193,7 @@ export default {
     // 编辑-跳转
     btnEditClickHandler (item) {
       this.$router.push({
-        path: '/systemSettings/serviceEdit',
+        path: '/dataBase/serviceEdit',
         query: { serviceID: item.serviceID }
       })
     },