Skip to content

Commit 11a3cb6

Browse files
committed
优化vue3版本示例页面
1 parent 2161231 commit 11a3cb6

File tree

1 file changed

+30
-86
lines changed

1 file changed

+30
-86
lines changed

Vol.Vue3版本/src/extension/order/App_Appointment.js

Lines changed: 30 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -38,97 +38,37 @@ let extension = {
3838
buttons: [], //扩展的按钮
3939
tableAction: 'App_Appointment', //指定菜单权限,其他任何页面引用时都会走对应权限
4040
text:
41-
'可在代码生成器中设置[是否只读]或如果没有编辑或新建权限,弹出框都是只读的',
41+
'代码生成器中设置[是否只读]或如果没有编辑或新建权限弹出框都是只读的(点击用户姓名列可查看表单分组)',
4242
methods: {
4343
//事件扩展
4444
onInit() {
45-
//设置表单分组
46-
this.editFormOptions.splice(0, 0, [
47-
{
48-
colSize: 12,
49-
render: (h) => {
50-
return h(
51-
'div',
52-
{
53-
style: {
54-
display: 'flex',
55-
'margin-bottom': '-4px',
56-
'line-height': '20px',
57-
'margin-top': '-10px',
58-
'padding-bottom': '5px',
59-
'border-bottom': '1px solid #eee'
60-
}
61-
},
62-
[
63-
h('div', {
64-
style: {
65-
height: '19px',
66-
background: '#2dced9',
67-
width: '9px',
68-
'border-radius': '10px'
69-
}
70-
}),
71-
h(
72-
'div',
73-
{
74-
style: {
75-
'padding-left': '6px',
76-
'font-weight': 'bold',
77-
'font-size': '13px'
78-
}
79-
},
80-
'基础信息'
81-
)
82-
]
83-
);
84-
}
85-
}
86-
]);
8745

46+
//设置显示所有查询条件
47+
this.setFiexdSearchForm(true);
8848

89-
this.editFormOptions.splice(2, 0, [
90-
{
91-
colSize: 12,
92-
render: (h) => {
93-
return h(
94-
'div',
95-
{
96-
style: {
97-
display: 'flex',
98-
'margin-bottom': '-4px',
99-
'line-height': '20px',
100-
'margin-top': '5px',
101-
'padding-bottom': '5px',
102-
'border-bottom': '1px solid #eee'
103-
}
104-
},
105-
[
106-
h('div', {
107-
style: {
108-
height: '19px',
109-
background: '#2dced9',
110-
width: '9px',
111-
'border-radius': '10px'
112-
}
113-
}),
114-
h(
115-
'div',
116-
{
117-
style: {
118-
'padding-left': '6px',
119-
'font-weight': 'bold',
120-
'font-size': '13px'
121-
}
122-
},
123-
'其他信息'
124-
)
125-
]
126-
);
49+
//格式化单格颜色
50+
this.columns.forEach(x => {
51+
if (x.field == "PhoneNo") {
52+
x.cellStyle = (row, rowIndex, columnIndex) => {
53+
if (row.PhoneNo == "138888887698" && rowIndex == 0) {
54+
return { background: "#ddecfd" }
55+
}
12756
}
12857
}
129-
])
130-
},
131-
initGroup() {
58+
if (x.field == "Creator") {
59+
x.cellStyle = (row, rowIndex, columnIndex) => {
60+
if (row.Creator == "超级管理员") {
61+
return { background: "rgb(45 140 240)", color: "#ffff" }
62+
}
63+
}
64+
}
65+
66+
if (x.field=='Name') {
67+
x.title="点击查看表单"
68+
}
69+
70+
})
71+
13272
//设置表单分组
13373
this.editFormOptions.splice(0, 0, [
13474
{
@@ -213,12 +153,16 @@ let extension = {
213153
);
214154
}
215155
}
216-
]);
156+
])
217157
},
158+
218159
onInited() {
219-
//多页签打开时,重新设置表格的最大高度
160+
//多页签菜单打开时,重新设置表格的最大高度
220161
if (this.$route.path == '/tabsTable') {
221162
this.tableMaxHeight = document.body.clientHeight - 415;
163+
} else {
164+
//设置表的最大高度
165+
this.tableMaxHeight = this.height-125;//400
222166
}
223167
//移除快捷查询
224168
this.singleSearch = null;

0 commit comments

Comments
 (0)