Przeglądaj źródła

删除TableConfig文件夹

suxinf 5 lat temu
rodzic
commit
f11fe44f90

+ 0 - 131
src/components/UploadInforTable.vue

@@ -1,131 +0,0 @@
-<template>
-  <div class="table_template">
-    <table class="table">
-        <thead>
-            <tr :style="tableHeadStyle">
-                <td v-for="(item, index) in tableHeader" :key="index" :style="tableHeadStyle">{{ item }}</td>
-            </tr>
-        </thead>
-        <tbody>
-            <tr v-for="(obj, index) in tableData" :key="index" :class="{ table_gray: !discolor && index%2 === 0 }">
-                <td :style="trStyle" v-if="flag">{{ index + 1 }}</td>
-                <td v-for="(item, index) in obj" :key="index" :style="trStyle">
-                    {{ item }}
-                </td>
-                <td :style="trStyle">
-                    <img src="../img/add.png" @click="changeIcon(index)" :style="operationStyle" v-if="imgFlag[index]">
-                    <img src="../img/delete.png" @click="changeIcon(index)" :style="operationStyle" v-else>
-                </td>
-            </tr>
-        </tbody>
-    </table>
-  </div>
-</template>
-
-<script>
-export default {
-    props: {
-        // 表数据
-        tableData: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        },
-        // 表头
-        tableHeader: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        },
-        // 表头样式
-        tableHeadStyle: {
-            type: Object,
-            default: () => {
-                return {
-                    background: '#848484',
-                    height: '50px',
-                    color: '#fff'
-                }
-            }
-        },
-        // 操作样式
-        operationStyle: {
-            type: Object,
-            default: () => {
-                return {
-                    color: '#0000ff'
-                }
-            }
-        },
-        // imgFlag
-        imgFlag: {
-            type: Array,
-            default: () => {
-                let arr = new Array(20).fill(20);
-                return arr
-            }
-        },
-        // 表格除去表头的样式
-        trStyle: {
-            type: Object,
-            default: () => {
-                return {
-                    width: '200px',
-                    height: '50px'
-                }
-            }
-        },
-        // 是否隔行变色
-        discolor: {
-            type: Boolean,
-            default: true
-        },
-        // 每页表格共有多少数据
-        pageSize: {
-            type: Number,
-            default: 20
-        },
-        flag: {
-            type: Boolean,
-            default: true
-        },
-    },
-    methods: { 
-        changeIcon: function(index) {
-            console.log(index);
-            this.$emit('change_icon', index);
-        }
-    },
-    mounted() {
-    },
-    data() {
-        return {
-        }
-    }
-};
-</script>
-
-<style scoped lang="less">
-.table_template{
-    text-align: center;
-    .table{
-        background-color: #fff;
-        border-collapse:collapse;
-        border:none;
-        width: 100%;
-        td{
-            border: 1px solid #ccc;
-        }
-        span{
-            &:hover{
-                cursor: pointer;
-            }
-        }
-    }
-}
-.table_gray{
-    background: #f5f5f5;
-}
-</style>

+ 0 - 19
src/tableConfig/carSeries1.js

@@ -1,19 +0,0 @@
-const TABLEHEADS = ['车系', '操作'];
-const TABLEHEADSTYLES = {
-    background: '#8D9092',
-    height: '36px',
-    color: '#fff',
-};
-const TRSSTYLE =  {
-    width: '50%',
-    height: '36px',
-};
-const OPERATIONSSTYLE = {
-    color: '#00f'
-}
-module.exports = {
-    TABLEHEADS,
-    TABLEHEADSTYLES,
-    TRSSTYLE,
-    OPERATIONSSTYLE
-}

+ 3 - 13
src/views/data/UploadInfor.vue

@@ -65,13 +65,8 @@
     </div>
     <div class="table">
       <UpLoadTable
-        :trStyle='trStyle'
-        :tableHeader='tableHeader'
         :tableData='tableData'
-        :tableHeadStyle='tableHeadStyle'
-        :discolor='discolor'
         @change_icon='changeIcon'
-        :operationStyle='operationStyle'
         :imgFlag='imgFlag'
       />
     </div>
@@ -93,10 +88,10 @@
 </template>
 
 <script>
-import UpLoadTable from '../../components/UploadInforTable';
+import UpLoadTable from './components/UploadInforTable';
 import Count from '../../components/Count';
 import Tablepage from '../../components/TablePage';
-import { AREASLIST, MATERIALTIMESLIST, TABLEHEADS,TABLEHEADSTYLES, TRSSTYLE, GROUPLISTS, OPERATIONSTYLES } from '../../tableConfig/uploadinfo';
+import { AREASLIST, GROUPLISTS } from './uploadinfo';
 export default {
   props:{
     isManufacturer: {
@@ -136,17 +131,12 @@ export default {
       // 表格配置
       sum: 240, // 一共有多少条数据
       pageSize: 20, // 每页展示的数据
-      discolor: false, // 是否隔行变色
       currentPage: 1,
       areaList: AREASLIST, // 按区域添加
       groupList: GROUPLISTS, // 按小组添加
-      materialTimeList: MATERIALTIMESLIST, // 素材时间
-      tableHeader: TABLEHEADS, // 表头
+      materialTimeList: ['2021/03', '2021/04', '2022/05'], // 素材时间
       tableData: [{name: '北京博瑞',code: 'L020',area: '东区'},{name: 'a',code: 'a',area: 'N'},{name: 'a',code: 'a',area: 'N'}],
-      tableHeadStyle: TABLEHEADSTYLES, // 表头样式
-      operationStyle: OPERATIONSTYLES,// 筛选图片样式
       imgFlag: new Array(20).fill(true), // 筛选栏用添加图片还是删除图片
-      trStyle: TRSSTYLE // 表格tr样式
       // 文件
     }
   },

+ 106 - 0
src/views/data/components/UploadInforTable.vue

@@ -0,0 +1,106 @@
+<template>
+  <div class="table_template">
+    <table class="table">
+        <thead>
+            <tr>
+                <td>序号</td>
+                <td>经销商名称</td>
+                <td>DLR Code</td>
+                <td>所属区域</td>
+                <td>筛选</td>
+            </tr>
+        </thead>
+        <tbody>
+            <tr v-for="(obj, index) in tableData" :key="index" :class="{ table_gray: index%2 === 0 }">
+                <td>{{ index + 1 }}</td>
+                <td v-for="(item, index) in obj" :key="index"   >
+                    {{ item }}
+                </td>
+                <td>
+                    <img src="../../../img/add.png" @click="changeIcon(index)" v-if="imgFlag[index]">
+                    <img src="../../../img/delete.png" @click="changeIcon(index)" v-else>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+  </div>
+</template>
+
+<script>
+export default {
+    props: {
+        // 表数据
+        tableData: {
+            type: Array,
+            default: () => {
+                return []
+            }
+        },
+        // 操作样式
+        operationStyle: {
+            type: Object,
+            default: () => {
+                return {
+                    color: '#0000ff'
+                }
+            }
+        },
+        // imgFlag
+        imgFlag: {
+            type: Array,
+            default: () => {
+                let arr = new Array(20).fill(20);
+                return arr
+            }
+        }
+    },
+    methods: { 
+        changeIcon: function(index) {
+            console.log(index);
+            this.$emit('change_icon', index);
+        }
+    },
+    mounted() {
+    },
+    data() {
+        return {
+        }
+    }
+};
+</script>
+
+<style scoped lang="less">
+.table_template{
+    text-align: center;
+    .table{
+        background-color: #fff;
+        border-collapse:collapse;
+        border:none;
+        width: 100%;
+        thead{
+            background-color: #8D9092;
+            height: 36px;
+            color: #fff;
+        }
+        td{
+            border: 1px solid #ccc;
+        }
+        span{
+            &:hover{
+                cursor: pointer;
+            }
+        }
+    }
+}
+.table_gray{
+    background: #f5f5f5;
+}
+img{
+    width: 20px;
+    height: 20px;
+}
+td{
+    width: 20%;
+    height: 36px;
+}
+</style>

+ 0 - 20
src/tableConfig/uploadinfo.js

@@ -25,28 +25,8 @@ const AREASLIST = [
         checked: false
     }
 ]
-const MATERIALTIMESLIST = ['2021/03', '2021/04'];
-const TABLEHEADS = ['序号', '经销商名称', 'DLR Code', '所属区域', '筛选'];
-const TABLEHEADSTYLES = {
-    background: '#8D9092',
-    height: '36px',
-    color: '#fff'
-};
-const TRSSTYLE =  {
-    width: '20%',
-    height: '36px'
-};
-const OPERATIONSTYLES = {
-    width: '20px',
-    height: '20px'
-}
 const GROUPLISTS = ['第一小组', '第二小组', '第三小组', '第四小组', '第五小组', '第六小组'];
 module.exports = {
     AREASLIST,
-    MATERIALTIMESLIST,
-    TABLEHEADS,
-    TABLEHEADSTYLES,
-    TRSSTYLE,
     GROUPLISTS,
-    OPERATIONSTYLES
 }

+ 1 - 3
src/views/parameter/ParameterIndex.vue

@@ -16,11 +16,9 @@
 </template>
 
 <script>
-import { TAG } from '../../tableConfig/parameter';
-// import CarSeries from './CarSeries';
+import { TAG } from "./routerConfig";
 export default {
   components:{
-    // CarSeries
   },
   data() {
     return {

src/tableConfig/parameter.js → src/views/parameter/routerConfig.js