Commit ec02a8ca authored by 黄奎's avatar 黄奎

页面修改

parent 52a8ea9a
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<thead> <thead>
<tr> <tr>
<td colspan="2"> <td colspan="2">
请求参数 &nbsp;&nbsp;请求参数
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="tdLeft"> <td class="tdLeft">
命令 命令
</td> </td>
<td class="tdRight"> <td class="tdRight">
<textarea :rows="1" :cols="50" v-model="ActionStr" placeholder="请输入命令"></textarea> <textarea :rows="1" :cols="50" v-model="ActionStr" placeholder="请输入命令"></textarea>
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
</tr> </tr>
<tr> <tr>
<td class="tdLeft"> <td class="tdLeft">
参数 参数
</td> </td>
<td class="tdRight"> <td class="tdRight">
<textarea :rows="3" :cols="50" v-model="Msg" placeholder="请输入参数"></textarea> <textarea :rows="3" :cols="50" v-model="Msg" placeholder="请输入参数"></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2" style="text-align:center;">
<input type="button" @click="Test()" value="执行" /> <input type="button" @click="Test()" value="执行" />
</td> </td>
</tr> </tr>
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
返回结果 &nbsp;&nbsp;返回结果
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="tdLeft"> <td class="tdLeft">
请求命令 请求命令
</td> </td>
<td class="tdRight"> <td class="tdRight">
{{ActionStr}} {{ActionStr}}
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</tr> </tr>
<tr> <tr>
<td class="tdLeft"> <td class="tdLeft">
请求参数 请求参数
</td> </td>
<td class="tdRight"> <td class="tdRight">
{{ShowMsg}} {{ShowMsg}}
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</tr> </tr>
<tr> <tr>
<td class="tdLeft"> <td class="tdLeft">
返回结果 返回结果
</td> </td>
<td class="tdRight"> <td class="tdRight">
{{Result}} {{Result}}
...@@ -78,8 +78,8 @@ ...@@ -78,8 +78,8 @@
}, },
data() { data() {
return { return {
ActionStr: "/Course/GetChapterTree", ActionStr: "/Course/",
Msg: "CourseId:1,School_Id:1", Msg: "",
ShowMsg: "", ShowMsg: "",
Result: "", Result: "",
}; };
...@@ -99,12 +99,18 @@ ...@@ -99,12 +99,18 @@
} }
}, },
methods: { methods: {
ClearMsg(str) {
//去掉空格
var result = str.replace(/\ +/g, "");
//去掉回车
result = result.replace(/[\r\n]/g, "");
return result;
},
Test() { Test() {
this.Result = ""; this.Result = "";
this.ShowMsg = ""; this.ShowMsg = "";
if (this.ActionStr && this.ActionStr != '') { if (this.ActionStr && this.ActionStr != '') {
var data = {}; var data = {};
var dataArray = [];
var tempStr = ""; var tempStr = "";
if (this.Msg && this.Msg != '') { if (this.Msg && this.Msg != '') {
var tempArray = this.Msg.split(','); var tempArray = this.Msg.split(',');
...@@ -113,10 +119,7 @@ ...@@ -113,10 +119,7 @@
if (tempArray[i] && tempArray[i] != '') { if (tempArray[i] && tempArray[i] != '') {
var subArray = tempArray[i].split(':'); var subArray = tempArray[i].split(':');
if (subArray && subArray.length == 2) { if (subArray && subArray.length == 2) {
var obj = {} tempStr += ',' + '"' + this.ClearMsg(subArray[0]) + '":' + this.ClearMsg(subArray[1]);
obj[subArray[0]] = subArray[1];
dataArray.push(obj);
tempStr += ',' + '"' + subArray[0] + '":' + '"' + subArray[1] + '"';
} }
} }
} }
...@@ -153,14 +156,16 @@ ...@@ -153,14 +156,16 @@
.CMD .cmdTable tr td { .CMD .cmdTable tr td {
border: 1px solid rgba(0, 0, 0, 0.12); border: 1px solid rgba(0, 0, 0, 0.12);
line-height: 40px; line-height: 35px;
min-height: 40px; min-height: 35px;
} }
.CMD .tdLeft { .CMD .tdLeft {
width: 20%; width: 15%;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
text-align: right;
padding-right: 20px;
} }
.CMD .tdRight { .CMD .tdRight {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment