Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
CRM
Commits
9dea7d2d
Commit
9dea7d2d
authored
May 18, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1e86d3de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
223 additions
and
1 deletion
+223
-1
Test.vue
src/components/Test.vue
+213
-0
router.js
src/router.js
+10
-1
No files found.
src/components/Test.vue
0 → 100644
View file @
9dea7d2d
<
template
>
<div
class=
"CMD"
>
<table
class=
"cmdTable"
>
<thead>
<tr>
<td
colspan=
"2"
>
请求参数
</td>
</tr>
<tr>
<td
class=
"tdLeft"
>
命令:
</td>
<td
class=
"tdRight"
>
<textarea
:rows=
"1"
:cols=
"50"
v-model=
"ActionStr"
placeholder=
"请输入命令"
></textarea>
</td>
</tr>
<tr>
<td
class=
"tdLeft"
>
参数列表:
</td>
<td
class=
"tdRight"
>
<table
class=
"parameterList"
>
<tr
v-for=
"(item,index) in parameterList"
:key=
"index"
>
<td>
参数名:
</td>
<td>
<input
type=
"text"
v-model=
"item.Name"
/>
</td>
<td>
参数值:
</td>
<td>
<input
type=
"text"
v-model=
"item.Value"
/>
</td>
<td>
<a
style=
"cursor:pointer;color:blue;"
@
click=
"AddParameter()"
>
新增
</a>
<a
v-if=
"index!=0"
style=
"cursor:pointer;color:red;"
@
click=
"DeleteParameter(index)"
>
删除
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td
colspan=
"2"
style=
"text-align:center;"
>
<input
type=
"button"
@
click=
"Test()"
value=
"执行"
/>
</td>
</tr>
</thead>
<tbody>
<tr>
<td
colspan=
"2"
>
</td>
</tr>
<tr>
<td
colspan=
"2"
>
返回结果
</td>
</tr>
<tr>
<td
class=
"tdLeft"
>
请求命令:
</td>
<td
class=
"tdRight"
>
{{
ActionStr
}}
</td>
</tr>
<tr>
<td
class=
"tdLeft"
>
请求参数:
</td>
<td
class=
"tdRight"
>
{{
ShowMsg
}}
</td>
</tr>
<tr>
<td
class=
"tdLeft"
>
返回结果:
</td>
<td
class=
"tdRight"
>
{{
Result
}}
</td>
</tr>
</tbody>
</table>
</div>
</
template
>
<
script
>
export
default
{
meta
:
{
title
:
'测试 - CRM'
,
},
data
()
{
return
{
ActionStr
:
"/Api/ClueStatic/CreateClue"
,
parameterList
:
[{
Name
:
""
,
Value
:
""
}],
ShowMsg
:
""
,
Result
:
""
,
};
},
created
()
{
},
mounted
()
{
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
},
immediate
:
true
}
},
methods
:
{
//新增参数
AddParameter
()
{
this
.
parameterList
.
push
({
Name
:
""
,
Value
:
""
});
},
//删除参数
DeleteParameter
(
index
)
{
this
.
parameterList
.
splice
(
index
,
1
);
},
ClearMsg
(
str
)
{
//去掉空格
var
result
=
str
.
replace
(
/
\
+/g
,
""
);
//去掉回车
result
=
result
.
replace
(
/
[\r\n]
/g
,
""
);
return
result
;
},
Test
(
type
)
{
this
.
Result
=
""
;
this
.
ShowMsg
=
""
;
if
(
this
.
ActionStr
&&
this
.
ActionStr
!=
''
)
{
var
data
=
{};
var
tempStr
=
""
;
if
(
this
.
parameterList
&&
this
.
parameterList
.
length
>
0
)
{
this
.
parameterList
.
forEach
(
item
=>
{
if
(
item
.
Name
&&
item
.
Name
!=
''
)
{
tempStr
+=
','
+
'"'
+
item
.
Name
+
'":"'
+
item
.
Value
+
'"'
;
}
})
}
if
(
tempStr
&&
tempStr
!=
''
)
{
tempStr
=
"{"
+
tempStr
.
substring
(
1
,
tempStr
.
length
)
+
"}"
;
data
=
JSON
.
parse
(
tempStr
);
}
data
=
{
};
this
.
ShowMsg
=
JSON
.
parse
(
JSON
.
stringify
(
tempMsg
));
if
(
this
.
ActionStr
&&
this
.
ActionStr
!=
''
)
{
this
.
apipost
(
this
.
ActionStr
,
data
,
(
res
)
=>
{
this
.
Result
=
JSON
.
stringify
(
res
);
});
}
}
}
},
};
</
script
>
<
style
scoped
>
.CMD
{
background
:
#f5f6f7
;
}
.CMD
.cmdTable
{
width
:
100%
;
max-width
:
100%
;
border-collapse
:
collapse
;
border-spacing
:
0
;
}
.CMD
.cmdTable
tr
td
{
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.12
);
line-height
:
35px
;
min-height
:
35px
;
}
.CMD
.tdLeft
{
width
:
15%
;
font-size
:
14px
;
font-weight
:
400
;
text-align
:
right
;
padding-right
:
20px
;
}
.CMD
.tdRight
{
width
:
70%
;
font-size
:
14px
;
font-weight
:
400
;
}
.CMD
.parameterList
{
border
:
none
;
border-collapse
:
collapse
;
}
.CMD
.parameterList
tr
td
{
border
:
none
;
border-collapse
:
collapse
;
}
</
style
>
\ No newline at end of file
src/router.js
View file @
9dea7d2d
...
...
@@ -20,6 +20,7 @@ import customerOrder from "./components/customerManage/customerOrder"
import
myCustomerOrder
from
"./components/customerManage/myCustomerOrder"
import
automaticLogin
from
'./views/automaticLogin'
import
planeTicketOrder
from
'./components/planeTicketOrder/index'
import
Test
from
"./components/Test"
Vue
.
use
(
Router
);
export
default
new
Router
({
...
...
@@ -460,10 +461,18 @@ export default new Router({
{
path
:
"/planeTicketOrder"
,
name
:
"planeTicketOrder"
,
component
:
planeTicketOrder
,
component
:
planeTicketOrder
,
meta
:
{
title
:
"订单核算统计"
}
},
{
path
:
"/test"
,
name
:
"test"
,
component
:
Test
,
meta
:
{
title
:
"测试命令"
}
}
]
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment