ConditionScriptDetails.vue
6.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<template>
<el-container>
<el-dialog
title="选择人员脚本"
:visible.sync="dialogVisible"
width="70%"
style="height: 800px"
:close-on-click-modal="false"
:before-close="handleClose"
>
<el-input placeholder="请输入名称、对象名" style="width: 355px;padding-bottom: 10px" v-model="searchData" class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="searchScript"></el-button>
</el-input>
<el-table
:data="scriptData"
ref="table"
height="410"
style="width: 100%;margin-top: 8px">
<el-table-column width="50">
<template slot-scope="scope">
<el-radio
v-model="conditionScriptIndex"
:label="scope.$index"
@change="getIndex(scope.row, scope.$index)"
><span></span
></el-radio>
</template>
</el-table-column>
<el-table-column
prop="methodName"
label="方法名称"
>
</el-table-column>
<el-table-column
prop="classInsName"
label="调用类对象名"
>
</el-table-column>
<el-table-column
prop="methodDesc"
label="方法描述"
>
</el-table-column>
<el-table-column type="expand" width="1">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-row><el-col>
<el-form-item label="脚本别名:">
<span class="scriptAlias">{{ props.row.methodName }}</span><br>
</el-form-item>
</el-col></el-row>
<el-row><el-col>
<el-form-item label="脚本描述:">
<span class="scriptDesc">{{ props.row.methodDesc }}</span>
</el-form-item>
</el-col></el-row>
<el-form-item>
<table
class="form-table"
cellspacing="0"
cellpadding="0"
border="0"
width="900px"
>
<tbody>
<tr>
<th width="100px" style="text-align: center">名称</th>
<th width="200px" style="text-align: center">参数类型:</th>
<th width="230px" style="text-align: center">参数说明:</th>
<th width="390px" style="text-align: center">参数值:</th>
</tr>
<tr v-for="(item,index) in argument.argument" :key="index">
<td>
<span style="text-align: center">{{ item.paraName }}</span>
</td>
<td>
<span style="text-align: center">{{ item.paraType }}</span>
</td>
<td>
<span style="text-align: center">{{item.paraDesc}}</span>
</td>
<td>
<ht-select :options="options" v-model="selectKey" style="width: 78px;">
</ht-select>
<ht-input />
</td>
</tr>
</tbody>
</table>
</el-form-item>
</el-form>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="handleClose">取 消</el-button>
<el-button @click="testScript">确 定</el-button>
</div>
</el-dialog>
</el-container>
</template>
<script>
import flow from "@/api/flow.js";
export default {
data() {
return {
dialogVisible: false,
scriptData: [],
conditionScriptIndex: 0,
argument: [],
options: [{key:1,value:'固定值'},{key:2,value:'变量'}],
selectKey:'变量',
searchData:''
};
},
methods: {
handleOpen() {
this.dialogVisible = true;
this.loadData();
},
handleClose() {
this.dialogVisible = false;
this.searchData='';
},
testScript(){
},
getIndex(row, index) {
this.conditionScriptIndex = index;
this.argument = {...row};
this.argument.argument=JSON.parse(row.argument);
let $table = this.$refs.table;
this.scriptData.map((item) => {
if (row.id != item.id) {
$table.toggleRowExpansion(item, false)
}
})
$table.toggleRowExpansion(row)
},
searchScript(){
let param = {
pageBean: {
page: 1,
showTotal: true
},
querys: [
{
property: "classInsName",
value: this.searchData,
group: "main",
operation: "LIKE",
relation: "OR"
},
{
property: "methodName",
value: this.searchData,
group: "main",
operation: "LIKE",
relation: "OR"
}
]
};
this.loadData(param)
},
loadData(param,cb) {
if(param){
flow
.getConditionScriptList(param)
.then(resp => {
this.scriptData = resp.data.rows;
})
.finally(() => cb());
}else {
flow
.getConditionScriptList()
.then(resp => {
this.scriptData = resp.data.rows;
})
.finally(() => cb());
}
}
}
};
</script>
<style scoped>
.scriptAlias{
height:15px;
font-size:14px;
font-family:Microsoft YaHei;
font-weight:bold;
color:rgba(28,28,28,1);
line-height:30px;
}
.scriptDesc{
height:14px;
font-size:14px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(28,28,28,1);
line-height:30px;
}
::-webkit-scrollbar
{
width: 8px; /*滚动条宽度*/
height: 22.1909%; /*滚动条高度*/
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(193,193,193,1);
border-radius: 4px; /*滚动条的背景区域的圆角*/
cursor: pointer;
background-color: rgba(144,147,153,.3);/*滚动条的背景颜色*/
transition: background-color .3s;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb
{
border-radius: 4px; /*滚动条的圆角*/
-webkit-box-shadow: inset 0 0 6px rgba(193,193,193,1);
cursor: pointer;
background-color: rgba(144,147,153,.3);/*滚动条的背景颜色*/
transition: background-color .3s;
}
</style>