a2e1e4cc by 任超

style:table表格样式

1 parent 47005ed0
...@@ -10,18 +10,18 @@ ...@@ -10,18 +10,18 @@
10 10
11 <template> 11 <template>
12 <div :class="['lb-table', customClass]"> 12 <div :class="['lb-table', customClass]">
13 <el-table v-if="!heightNumSetting" class="table-fixed" ref="elTable" :border='border' 13 <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable"
14 :row-class-name="tableRowClassName" :show-header='showHeader' 14 :border='border' :row-class-name="tableRowClassName" :show-header='showHeader'
15 :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners" 15 :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners"
16 :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> 16 :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod">
17 <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> 17 <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item">
18 </lb-column> 18 </lb-column>
19 </el-table> 19 </el-table>
20 20
21 <el-table v-else ref="elTable" class="table-fixed" :border='border' :row-class-name="tableRowClassName" 21 <el-table v-else ref="elTable" class="table-fixed" :row-style="{ height: '50px' }" :border='border'
22 :show-header='showHeader' :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" 22 :row-class-name="tableRowClassName" :show-header='showHeader'
23 :max-height="maxHeight" v-on="$listeners" :data="data" style="width: 100%" 23 :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :max-height="maxHeight"
24 :span-method="this.merge ? this.mergeMethod : this.spanMethod"> 24 v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod">
25 <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> 25 <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item">
26 </lb-column> 26 </lb-column>
27 </el-table> 27 </el-table>
......
...@@ -5,30 +5,45 @@ ...@@ -5,30 +5,45 @@
5 {{ title }} 5 {{ title }}
6 <div class="checkbox"> 6 <div class="checkbox">
7 <el-checkbox-group v-model="checkList" @change="checkChange"> 7 <el-checkbox-group v-model="checkList" @change="checkChange">
8 <el-checkbox 8 <el-checkbox v-for="item in qsztList" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
9 v-for="item in qsztList"
10 :key="item.value"
11 :label="item.value"
12 >{{ item.label }}</el-checkbox
13 >
14 </el-checkbox-group> 9 </el-checkbox-group>
15 </div> 10 </div>
16 </div> 11 </div>
17 <div class="xxTableBox"> 12 <div class="xxTableBox">
13 <!-- 固定前三个 -->
18 <table class="xxTable"> 14 <table class="xxTable">
19 <tr v-for="(item, colindex) in columns" :key="colindex"> 15 <tr v-for="(item, colindex) in columns.slice(0, 3)" :key="colindex">
20 <td> 16 <td>
21 {{ item.label }} 17 {{ item.label }}
22 </td> 18 </td>
23 <td 19 <td v-for="(row, index) in tableData" :key="index" :class="[
24 v-for="(row, index) in tableData"
25 :key="index"
26 :class="[
27 row.qszt == '2' ? 'lishi' : '', 20 row.qszt == '2' ? 'lishi' : '',
28 row.qszt == '0' ? 'linshi' : '', 21 row.qszt == '0' ? 'linshi' : '',
29 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '', 22 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
30 ]" 23 ]">
31 > 24 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
25 正在办理
26 </div>
27 <span v-if="item.prop == 'qszt'">
28 {{ getQsztName(row[item.prop]) }}
29 </span>
30
31 <span v-else> {{ row[item.prop] }}</span>
32 </td>
33 <td v-for="count in emptycolNum" :key="~count"></td>
34 </tr>
35 </table>
36
37 <table class="xxTable rollTable">
38 <tr v-for="(item, colindex) in columns.slice(3)" :key="colindex">
39 <td>
40 {{ item.label }}
41 </td>
42 <td v-for="(row, index) in tableData" :key="index" :class="[
43 row.qszt == '2' ? 'lishi' : '',
44 row.qszt == '0' ? 'linshi' : '',
45 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
46 ]">
32 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'"> 47 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
33 正在办理 48 正在办理
34 </div> 49 </div>
...@@ -50,7 +65,7 @@ ...@@ -50,7 +65,7 @@
50 import { getJsydsyqList } from "@/api/registerBook.js"; 65 import { getJsydsyqList } from "@/api/registerBook.js";
51 import { datas } from "./qlxxFormData.js"; 66 import { datas } from "./qlxxFormData.js";
52 export default { 67 export default {
53 data() { 68 data () {
54 return { 69 return {
55 title: "建设用地使用权、宅基地使用权登记信息", 70 title: "建设用地使用权、宅基地使用权登记信息",
56 qsztList: datas.columns().qsztList, 71 qsztList: datas.columns().qsztList,
...@@ -65,11 +80,11 @@ export default { ...@@ -65,11 +80,11 @@ export default {
65 columns: datas.columns().JSYDSYQ, 80 columns: datas.columns().JSYDSYQ,
66 }; 81 };
67 }, 82 },
68 created() { 83 created () {
69 this.loadData(); 84 this.loadData();
70 }, 85 },
71 methods: { 86 methods: {
72 loadData() { 87 loadData () {
73 getJsydsyqList({ 88 getJsydsyqList({
74 bdcdyid: this.propsParam.bdcdyid, 89 bdcdyid: this.propsParam.bdcdyid,
75 qllx: this.propsParam.qllx, 90 qllx: this.propsParam.qllx,
...@@ -86,7 +101,7 @@ export default { ...@@ -86,7 +101,7 @@ export default {
86 } 101 }
87 }); 102 });
88 }, 103 },
89 checkChange() { 104 checkChange () {
90 if (this.checkList.length === 0) { 105 if (this.checkList.length === 0) {
91 this.tableData = []; 106 this.tableData = [];
92 this.emptycolNum = datas.columns().emptycolNum; 107 this.emptycolNum = datas.columns().emptycolNum;
...@@ -94,7 +109,7 @@ export default { ...@@ -94,7 +109,7 @@ export default {
94 this.loadData(); 109 this.loadData();
95 } 110 }
96 }, 111 },
97 getQsztName(code) { 112 getQsztName (code) {
98 let name = ""; 113 let name = "";
99 for (let item of this.qsztList) { 114 for (let item of this.qsztList) {
100 if (item.value == code) { 115 if (item.value == code) {
......
...@@ -5,30 +5,22 @@ ...@@ -5,30 +5,22 @@
5 {{ title }} 5 {{ title }}
6 <div class="checkbox"> 6 <div class="checkbox">
7 <el-checkbox-group v-model="checkList" @change="checkChange"> 7 <el-checkbox-group v-model="checkList" @change="checkChange">
8 <el-checkbox 8 <el-checkbox v-for="item in qsztList" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
9 v-for="item in qsztList"
10 :key="item.value"
11 :label="item.value"
12 >{{ item.label }}</el-checkbox
13 >
14 </el-checkbox-group> 9 </el-checkbox-group>
15 </div> 10 </div>
16 </div> 11 </div>
17 <div class="xxTableBox"> 12 <div class="xxTableBox">
13 <!-- 固定前三个 -->
18 <table class="xxTable"> 14 <table class="xxTable">
19 <tr v-for="(item, colindex) in columns" :key="colindex"> 15 <tr v-for="(item, colindex) in columns.slice(0, 3)" :key="colindex">
20 <td> 16 <td>
21 {{ item.label }} 17 {{ item.label }}
22 </td> 18 </td>
23 <td 19 <td v-for="(row, index) in tableData" :key="index" :class="[
24 v-for="(row, index) in tableData"
25 :key="index"
26 :class="[
27 row.qszt == '2' ? 'lishi' : '', 20 row.qszt == '2' ? 'lishi' : '',
28 row.qszt == '0' ? 'linshi' : '', 21 row.qszt == '0' ? 'linshi' : '',
29 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '', 22 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
30 ]" 23 ]">
31 >
32 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'"> 24 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
33 正在办理 25 正在办理
34 </div> 26 </div>
...@@ -41,6 +33,30 @@ ...@@ -41,6 +33,30 @@
41 <td v-for="count in emptycolNum" :key="~count"></td> 33 <td v-for="count in emptycolNum" :key="~count"></td>
42 </tr> 34 </tr>
43 </table> 35 </table>
36
37 <table class="xxTable rollTable">
38 <tr v-for="(item, colindex) in columnsslice(3)" :key="colindex">
39 <td>
40 {{ item.label }}
41 </td>
42 <td v-for="(row, index) in tableData" :key="index" :class="[
43 row.qszt == '2' ? 'lishi' : '',
44 row.qszt == '0' ? 'linshi' : '',
45 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
46 ]">
47 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
48 正在办理
49 </div>
50 <span v-if="item.prop == 'qszt'">
51 {{ getQsztName(row[item.prop]) }}
52 </span>
53
54 <span v-else> {{ row[item.prop] }}</span>
55 </td>
56 <td v-for="count in emptycolNum" :key="~count"></td>
57 </tr>
58 </table>
59
44 </div> 60 </div>
45 </div> 61 </div>
46 </div> 62 </div>
...@@ -50,7 +66,7 @@ ...@@ -50,7 +66,7 @@
50 import { getFdcq2List } from "@/api/registerBook.js"; 66 import { getFdcq2List } from "@/api/registerBook.js";
51 import { datas } from "./qlxxFormData.js"; 67 import { datas } from "./qlxxFormData.js";
52 export default { 68 export default {
53 data() { 69 data () {
54 return { 70 return {
55 title: "房地产权登记信息(独幢、层、套、间房屋)", 71 title: "房地产权登记信息(独幢、层、套、间房屋)",
56 qsztList: datas.columns().qsztList, 72 qsztList: datas.columns().qsztList,
...@@ -65,11 +81,11 @@ export default { ...@@ -65,11 +81,11 @@ export default {
65 columns: datas.columns().FDCQ2, 81 columns: datas.columns().FDCQ2,
66 }; 82 };
67 }, 83 },
68 created() { 84 created () {
69 this.loadData(); 85 this.loadData();
70 }, 86 },
71 methods: { 87 methods: {
72 loadData() { 88 loadData () {
73 getFdcq2List({ 89 getFdcq2List({
74 bdcdyid: this.propsParam.bdcdyid, 90 bdcdyid: this.propsParam.bdcdyid,
75 qllx: this.propsParam.qllx, 91 qllx: this.propsParam.qllx,
...@@ -86,7 +102,7 @@ export default { ...@@ -86,7 +102,7 @@ export default {
86 } 102 }
87 }); 103 });
88 }, 104 },
89 checkChange() { 105 checkChange () {
90 if (this.checkList.length === 0) { 106 if (this.checkList.length === 0) {
91 this.tableData = []; 107 this.tableData = [];
92 this.emptycolNum = datas.columns().emptycolNum; 108 this.emptycolNum = datas.columns().emptycolNum;
...@@ -94,7 +110,7 @@ export default { ...@@ -94,7 +110,7 @@ export default {
94 this.loadData(); 110 this.loadData();
95 } 111 }
96 }, 112 },
97 getQsztName(code) { 113 getQsztName (code) {
98 let name = ""; 114 let name = "";
99 for (let item of this.qsztList) { 115 for (let item of this.qsztList) {
100 if (item.value == code) { 116 if (item.value == code) {
......
...@@ -5,30 +5,45 @@ ...@@ -5,30 +5,45 @@
5 {{ title }} 5 {{ title }}
6 <div class="checkbox"> 6 <div class="checkbox">
7 <el-checkbox-group v-model="checkList" @change="checkChange"> 7 <el-checkbox-group v-model="checkList" @change="checkChange">
8 <el-checkbox 8 <el-checkbox v-for="item in qsztList" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
9 v-for="item in qsztList"
10 :key="item.value"
11 :label="item.value"
12 >{{ item.label }}</el-checkbox
13 >
14 </el-checkbox-group> 9 </el-checkbox-group>
15 </div> 10 </div>
16 </div> 11 </div>
17 <div class="xxTableBox"> 12 <div class="xxTableBox">
13 <!-- 固定前三个 -->
18 <table class="xxTable"> 14 <table class="xxTable">
19 <tr v-for="(item, colindex) in columns" :key="colindex"> 15 <tr v-for="(item, colindex) in columns.slice(0, 3)" :key="colindex">
20 <td> 16 <td>
21 {{ item.label }} 17 {{ item.label }}
22 </td> 18 </td>
23 <td 19 <td v-for="(row, index) in tableData" :key="index" :class="[
24 v-for="(row, index) in tableData"
25 :key="index"
26 :class="[
27 row.qszt == '2' ? 'lishi' : '', 20 row.qszt == '2' ? 'lishi' : '',
28 row.qszt == '0' ? 'linshi' : '', 21 row.qszt == '0' ? 'linshi' : '',
29 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '', 22 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
30 ]" 23 ]">
31 > 24 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
25 正在办理
26 </div>
27 <span v-if="item.prop == 'qszt'">
28 {{ getQsztName(row[item.prop]) }}
29 </span>
30
31 <span v-else> {{ row[item.prop] }}</span>
32 </td>
33 <td v-for="count in emptycolNum" :key="~count"></td>
34 </tr>
35 </table>
36
37 <table class="xxTable rollTable">
38 <tr v-for="(item, colindex) in columns.slice(3)" :key="colindex">
39 <td>
40 {{ item.label }}
41 </td>
42 <td v-for="(row, index) in tableData" :key="index" :class="[
43 row.qszt == '2' ? 'lishi' : '',
44 row.qszt == '0' ? 'linshi' : '',
45 item.prop == 'qszt' && row.qszt == '0' ? 'linshiIcon' : '',
46 ]">
32 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'"> 47 <div class="icon" v-if="item.prop == 'qszt' && row.qszt == '0'">
33 正在办理 48 正在办理
34 </div> 49 </div>
...@@ -50,7 +65,7 @@ ...@@ -50,7 +65,7 @@
50 import { getJsydsyqList } from "@/api/registerBook.js"; 65 import { getJsydsyqList } from "@/api/registerBook.js";
51 import { datas } from "./qlxxFormData.js"; 66 import { datas } from "./qlxxFormData.js";
52 export default { 67 export default {
53 data() { 68 data () {
54 return { 69 return {
55 title: "建设用地使用权、宅基地使用权登记信息", 70 title: "建设用地使用权、宅基地使用权登记信息",
56 qsztList: datas.columns().qsztList, 71 qsztList: datas.columns().qsztList,
...@@ -65,11 +80,11 @@ export default { ...@@ -65,11 +80,11 @@ export default {
65 columns: datas.columns().JSYDSYQ, 80 columns: datas.columns().JSYDSYQ,
66 }; 81 };
67 }, 82 },
68 created() { 83 created () {
69 this.loadData(); 84 this.loadData();
70 }, 85 },
71 methods: { 86 methods: {
72 loadData() { 87 loadData () {
73 getJsydsyqList({ 88 getJsydsyqList({
74 bdcdyid: this.propsParam.bdcdyid, 89 bdcdyid: this.propsParam.bdcdyid,
75 qllx: this.propsParam.qllx, 90 qllx: this.propsParam.qllx,
...@@ -86,7 +101,7 @@ export default { ...@@ -86,7 +101,7 @@ export default {
86 } 101 }
87 }); 102 });
88 }, 103 },
89 checkChange() { 104 checkChange () {
90 if (this.checkList.length === 0) { 105 if (this.checkList.length === 0) {
91 this.tableData = []; 106 this.tableData = [];
92 this.emptycolNum = datas.columns().emptycolNum; 107 this.emptycolNum = datas.columns().emptycolNum;
...@@ -94,7 +109,7 @@ export default { ...@@ -94,7 +109,7 @@ export default {
94 this.loadData(); 109 this.loadData();
95 } 110 }
96 }, 111 },
97 getQsztName(code) { 112 getQsztName (code) {
98 let name = ""; 113 let name = "";
99 for (let item of this.qsztList) { 114 for (let item of this.qsztList) {
100 if (item.value == code) { 115 if (item.value == code) {
......
...@@ -105,13 +105,19 @@ ...@@ -105,13 +105,19 @@
105 z-index: 10; 105 z-index: 10;
106 } 106 }
107 107
108 tr {
109 display: flex;
110 }
111
108 tr td { 112 tr td {
109 border: 1px solid #ccc; 113 border: 1px solid rgb(227, 226, 226);
110 text-align: center; 114 text-align: center;
111 height: 40px; 115 height: 40px;
112 padding: 4px; 116 padding: 4px;
113 font-size: 13px; 117 font-size: 13px;
114 width: 140px; 118 width: 140px;
119 flex: 1;
120 width: 100%;
115 } 121 }
116 122
117 >tr:nth-child(odd) td { 123 >tr:nth-child(odd) td {
...@@ -130,5 +136,12 @@ ...@@ -130,5 +136,12 @@
130 color: #7f7f7f; 136 color: #7f7f7f;
131 } 137 }
132 } 138 }
139
140 .rollTable {
141 margin-top: -2px;
142 display: block;
143 height: calc(100vh - 300px);
144 overflow-y: scroll;
145 }
133 } 146 }
134 } 147 }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -426,7 +426,6 @@ export default { ...@@ -426,7 +426,6 @@ export default {
426 }, 426 },
427 //表单选项卡事件 427 //表单选项卡事件
428 beforeLeave (activeName, oldActiveName) { 428 beforeLeave (activeName, oldActiveName) {
429 console.log(this.oldDetail, this.newDetail);
430 if (!_.isEqual(this.oldDetail, this.newDetail)) { 429 if (!_.isEqual(this.oldDetail, this.newDetail)) {
431 this.$message.error('界面内容有所变化,请先保存') 430 this.$message.error('界面内容有所变化,请先保存')
432 return false 431 return false
...@@ -436,6 +435,7 @@ export default { ...@@ -436,6 +435,7 @@ export default {
436 }, 435 },
437 //切换选项卡内容组件 436 //切换选项卡内容组件
438 getFromRouter (tabname) { 437 getFromRouter (tabname) {
438 console.log(tabname, 'tabnametabname');
439 this.componentTag = getForm(tabname, this.$route.query.sqywbm); 439 this.componentTag = getForm(tabname, this.$route.query.sqywbm);
440 }, 440 },
441 //发送下一个环节 441 //发送下一个环节
......