Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e6151bb8
authored
2023-01-16 17:45:34 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:xml
1 parent
fec2cdcb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
44 deletions
src/api/sbbwcx.js
src/components/JsonEditor/index.vue
src/components/dataDetails/edit-dialog.vue
src/api/sbbwcx.js
View file @
e6151bb
...
...
@@ -2,6 +2,17 @@ import request from '@/utils/request'
import
SERVER
from
'./config'
// 区县上报分页
export
function
getXml
(
bizMsgid
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sjsb/DataReport/getXml'
,
method
:
'get'
,
params
:
{
businessId
:
bizMsgid
}
})
}
// 区县上报分页
export
function
getAreaReportPage
(
data
)
{
return
request
({
url
:
SERVER
.
SERVERAPI
+
'/rest/sjsb/DataReport/getAreaReportPage'
,
...
...
@@ -10,6 +21,7 @@ export function getAreaReportPage (data) {
})
}
// 接入数据上报分页
export
function
getReceiveDataReportPage
(
data
)
{
return
request
({
...
...
src/components/JsonEditor/index.vue
View file @
e6151bb
<
template
>
<
vue-json-editor
v-model=
"resultInfo"
:showBtns=
"false"
:mode=
"'code'"
lang=
"zh"
@
json-change=
"onJsonChange"
@
json-save=
"onJsonSave"
/
>
<
el-input
type=
"textarea"
:rows=
"6"
placeholder=
"请输入内容"
v-model=
"resultInfo"
>
</el-input
>
</
template
>
<
script
>
// 引入json编译器
...
...
@@ -9,22 +9,15 @@ export default {
components
:
{
vueJsonEditor
},
props
:
{
resultInfo
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
myValue
:
this
.
value
,
resultInfo
:
{
"userId"
:
"1111111129ac7325-30da-4e6a-8a00-9699820fc04a"
,
"realName"
:
"小雪18"
,
"gradeCode"
:
"166"
,
"provinceCode"
:
"110000"
,
"cityCode"
:
{
"test1"
:
"test1"
,
"test2"
:
"test2"
},
"schoolId"
:
21
,
"schoolLevel"
:
1
,
"schoolName"
:
"北京第二实验小学朝阳学校"
},
}
},
methods
:
{
...
...
@@ -40,33 +33,11 @@ export default {
</
script
>
<
style
>
.ace-jsoneditor
.ace_gutter
{
background-color
:
#08346F
!important
;
color
:
#FFFFFF
!important
;
}
.ace_content
{
background-color
:
#05275B
!important
;
}
.ace_marker-layer
.ace_active-line
{
background-color
:
#4e8ae2
!important
;
}
.ace-jsoneditor
.ace_variable
{
color
:
#FFFFFF
!important
;
}
.jsoneditor-menu
{
background-color
:
#074487
!important
;
}
/* jsoneditor右上角默认有一个链接,加css去掉了 */
.jsoneditor-poweredBy
{
display
:
none
;
}
.jsoneditor-vue
{
height
:
300px
;
.el-textarea__inner
{
min-height
:
73vh
!important
;
background-color
:
#08346F
!important
;
color
:
#ffffff
;
border
:
none
!important
;
}
</
style
>
\ No newline at end of file
...
...
src/components/dataDetails/edit-dialog.vue
View file @
e6151bb
...
...
@@ -99,7 +99,7 @@
:bsmYwsjb="bsmYwsjb" :bsmSjsb="dataReport.bsmReport" />
</div>
</div>
<JsonEditor
v-else
/>
<JsonEditor
:resultInfo=
"resultInfo"
v-else
/>
<!--
<div
slot=
"footer"
class=
"dialog_footer"
ref=
"dialogFooter"
>
<div
class=
"dialog_button"
>
<el-button
type=
"primary"
plain
@
click=
"submitForm"
v-if=
"!Edit"
:loading=
"saveloding"
>
确定
...
...
@@ -114,7 +114,7 @@
import
{
mapGetters
}
from
"vuex"
;
import
dataReporting
from
"@/api/dataReporting"
;
import
JsonEditor
from
"@/components/JsonEditor/index"
;
import
{
getDetail
}
from
"@/api/sbbwcx.js"
;
import
{
getDetail
,
getXml
}
from
"@/api/sbbwcx.js"
;
import
{
MessageBox
}
from
"element-ui"
;
export
default
{
components
:
{
JsonEditor
},
...
...
@@ -129,6 +129,9 @@ export default {
},
data
()
{
return
{
resultInfo
:
''
,
titleName
:
'sjmx'
,
dataReport
:
{},
...
...
@@ -177,6 +180,11 @@ export default {
this
.
editItem
=
this
.
loadView
(
this
.
activeName
);
}
});
// 获取xml
getXml
(
item
.
bizMsgid
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
resultInfo
=
res
.
message
})
},
changeList
(
val
)
{
let
_index
=
val
.
index
;
...
...
Please
register
or
sign in
to post a comment