Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
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
西魏
cms_sys
Commits
5d5aca22
Commit
5d5aca22
authored
Apr 02, 2021
by
wujj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章模型
parent
7b6f4330
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
34 deletions
+9
-34
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+9
-34
No files found.
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
5d5aca22
<!DOCTYPE html>
<html>
<head>
<title>
文章
</title>
<title>
文章
1
</title>
<
#
include
"../../
include
/
head-file
.
ftl
"
>
<script
src=
"${base}/static/mdiy/index.js"
></script>
</head>
<body>
<div
id=
"form"
v-cloak
>
...
...
@@ -440,50 +441,24 @@
changeModel
:
function
()
{
var
that
=
this
;
that
.
editableTabs
=
[
that
.
editableTabs
[
0
]];
this
.
removeModel
();
if
(
this
.
currCategory
)
{
if
(
this
.
currCategory
.
mdiyModelId
)
{
ms
.
http
.
get
(
ms
.
manager
+
"/mdiy/model/get.do"
,
{
id
:
this
.
currCategory
.
mdiyModelId
}).
then
(
function
(
data
)
{
if
(
data
.
data
&&
data
.
data
.
id
)
{
that
.
rederModel
(
data
.
data
,
JSON
.
parse
(
data
.
data
.
modelJson
));
}
});
that
.
rederModel
(
this
.
currCategory
.
mdiyModelId
)
}
}
},
rederModel
:
function
(
model
Entity
,
data
)
{
rederModel
:
function
(
model
Id
)
{
var
that
=
this
;
that
.
editableTabs
.
push
({
title
:
modelEntity
.
modelName
,
title
:
''
,
name
:
'custom-name'
});
this
.
removeModel
();
that
.
$nextTick
(
function
()
{
var
div
=
document
.
createElement
(
'div'
);
div
.
id
=
'c_model'
;
var
model
=
document
.
getElementById
(
'model1'
);
model
.
appendChild
(
div
);
var
s
=
document
.
createElement
(
'script'
);
s
.
innerHTML
=
data
.
script
;
var
con
=
document
.
createElement
(
'div'
);
con
.
id
=
'custom-model'
;
con
.
innerHTML
=
data
.
html
;
div
.
appendChild
(
s
);
div
.
appendChild
(
con
);
//初始化自定义模型并传入关联参数
that
.
model
=
new
custom_model
({
data
:
{
title
:
modelEntity
.
modelName
,
modelId
:
modelEntity
.
id
,
form
:
{
linkId
:
that
.
form
.
id
}
}
});
ms
.
mdiy
.
model
.
model
(
"model1"
,
{
id
:
modelId
},{
linkId
:
that
.
form
.
id
}).
then
(
function
(
obj
)
{
that
.
model
=
obj
;
that
.
editableTabs
[
1
].
title
=
obj
.
modelName
});
},
getValue
:
function
(
data
)
{
this
.
form
.
categoryId
=
data
.
id
;
...
...
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