Commit ec02a8ca authored by 黄奎's avatar 黄奎

页面修改

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