diff --git a/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmPropertyServiceImpl.java b/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmPropertyServiceImpl.java
index a5b359a27e65ced6d3d3141265295756277e84c3..8c7f820b87d11b32f3e9c5102a2757f73e76b3f4 100644
--- a/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmPropertyServiceImpl.java
+++ b/skyeye-service/src/main/java/com/skyeye/smprogram/service/impl/RmPropertyServiceImpl.java
@@ -60,7 +60,7 @@ public class RmPropertyServiceImpl implements RmPropertyService{
map.put("createTime", ToolUtil.getTimeAndToString());
rmPropertyDao.insertRmPropertyMation(map);
}else{
- outputObject.setreturnMessage("该小程序样式属性名称已存在,不可进行二次保存");
+ outputObject.setreturnMessage("该样式属性名称或者标签已存在,不可进行二次保存");
}
}
@@ -115,7 +115,7 @@ public class RmPropertyServiceImpl implements RmPropertyService{
if(bean == null){
rmPropertyDao.editRmPropertyMationById(map);
}else{
- outputObject.setreturnMessage("该小程序样式属性名称已存在,不可进行二次保存");
+ outputObject.setreturnMessage("该样式属性名称或者标签已存在,不可进行二次保存");
}
}
diff --git a/skyeye-web/src/main/resources/dbmapper/RmPropertyMapper.xml b/skyeye-web/src/main/resources/dbmapper/RmPropertyMapper.xml
index 41cba0b708078c89e0b739c2ae8c7bd587fbd73f..ca3a3f9eb2afadf0ee3b7ec2caf85e02740dbe64 100644
--- a/skyeye-web/src/main/resources/dbmapper/RmPropertyMapper.xml
+++ b/skyeye-web/src/main/resources/dbmapper/RmPropertyMapper.xml
@@ -5,56 +5,106 @@
- INSERT into
- (id, create_id, create_time)
+ INSERT into rm_property
+ (id, title, property_tag, property_out, ds_form_content_id, html_content, js_content, js_rely_on, create_id, create_time)
VALUES
- (#{id}, #{createId}, #{createTime})
+ (#{id}, #{title}, #{propertyTag}, #{propertyOut}, #{dsFormContentId}, #{htmlContent}, #{jsContent}, #{jsRelyOn}, #{createId}, #{createTime})
DELETE
FROM
-
+ rm_property
WHERE
id = #{id}
- UPDATE
+ UPDATE rm_property
-
+
+ title = #{title},
+
+
+ property_tag = #{propertyTag},
+
+
+ property_out = #{propertyOut},
+
+
+ ds_form_content_id = #{dsFormContentId},
+
+
+ html_content = #{htmlContent},
+
+ js_content = #{jsContent},
+ js_rely_on = #{jsRelyOn},
WHERE id = #{id}
diff --git a/skyeye-web/src/main/resources/mapping/reqmapping.xml b/skyeye-web/src/main/resources/mapping/reqmapping.xml
index f2328c97fa9896b02d3a087dc415554a185a9f85..1c22bf62134e51082d2c608f838d969e2e0a1815 100644
--- a/skyeye-web/src/main/resources/mapping/reqmapping.xml
+++ b/skyeye-web/src/main/resources/mapping/reqmapping.xml
@@ -329,8 +329,18 @@
+
+
+
+
+
+
+
+
+
+
@@ -340,6 +350,13 @@
+
+
+
+
+
+
+
diff --git a/skyeye-web/src/main/webapp/js/codemodel/codemodeladd.js b/skyeye-web/src/main/webapp/js/codemodel/codemodeladd.js
index b94765b3df13a145c2ba867ad2f21030cc1567b5..cf3401561dcfd48048663eeed7637bddc1e6b72c 100644
--- a/skyeye-web/src/main/webapp/js/codemodel/codemodeladd.js
+++ b/skyeye-web/src/main/webapp/js/codemodel/codemodeladd.js
@@ -30,7 +30,7 @@ layui.config({
var editor = CodeMirror.fromTextArea(document.getElementById("modelContent"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : false, // 是否只读,默认false
diff --git a/skyeye-web/src/main/webapp/js/codemodel/codemodeledit.js b/skyeye-web/src/main/webapp/js/codemodel/codemodeledit.js
index e3d4e233c7f50a7e2fc354ed57cc997c6cb1bdc6..8b6e6a2d4825c3d3bb418be12bc0d48dbe6abb7f 100644
--- a/skyeye-web/src/main/webapp/js/codemodel/codemodeledit.js
+++ b/skyeye-web/src/main/webapp/js/codemodel/codemodeledit.js
@@ -41,7 +41,7 @@ layui.config({
editor = CodeMirror.fromTextArea(document.getElementById("modelContent"), {
mode : returnModel(json.bean.modelType), // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : false, // 是否只读,默认false
diff --git a/skyeye-web/src/main/webapp/js/codemodel/codemodellist.js b/skyeye-web/src/main/webapp/js/codemodel/codemodellist.js
index 143bc2cd5e83b3c7106a2d7217bd88c87305a482..db6f14923cf6b488c5ce14734f20ba7b7a238690 100644
--- a/skyeye-web/src/main/webapp/js/codemodel/codemodellist.js
+++ b/skyeye-web/src/main/webapp/js/codemodel/codemodellist.js
@@ -39,7 +39,7 @@ layui.config({
var editor = CodeMirror.fromTextArea(document.getElementById("modelContent"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : true, // 是否只读,默认false
diff --git a/skyeye-web/src/main/webapp/js/codemodelgroup/addcontenttohtmlorjs.js b/skyeye-web/src/main/webapp/js/codemodelgroup/addcontenttohtmlorjs.js
index 8cf2224faba352f28c9dc16b561e81fc33a80bfb..71fc46a5faf49c16400c21639e3e6d6569ea258d 100644
--- a/skyeye-web/src/main/webapp/js/codemodelgroup/addcontenttohtmlorjs.js
+++ b/skyeye-web/src/main/webapp/js/codemodelgroup/addcontenttohtmlorjs.js
@@ -78,7 +78,7 @@ layui.config({
var htmlModelEditor = CodeMirror.fromTextArea(document.getElementById("htmlModelEditor"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : true, // 是否只读,默认false
@@ -90,7 +90,7 @@ layui.config({
var jsModelEditor = CodeMirror.fromTextArea(document.getElementById("jsModelEditor"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : true, // 是否只读,默认false
@@ -103,7 +103,7 @@ layui.config({
var htmlSuccessEditor = CodeMirror.fromTextArea(document.getElementById("htmlSuccessEditor"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : false, // 是否只读,默认false
@@ -116,7 +116,7 @@ layui.config({
var jsSuccessEditor = CodeMirror.fromTextArea(document.getElementById("jsSuccessEditor"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : false, // 是否只读,默认false
diff --git a/skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js b/skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
index 31cef6cbdbb62216afc94fca92a6ed85bd7a93f3..165c9da963178abdc9ca1a9b464af22a826b9141 100644
--- a/skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
+++ b/skyeye-web/src/main/webapp/js/codemodelgroup/usemodelgroup.js
@@ -46,6 +46,7 @@ layui.config({
}else{
for(var i = 0; i < subData.length; i++){
subData[i].modelContent = "";
+ subData[i].content = encodeURI(subData[i].content.replace(/\+/g, "%2B").replace(/\&/g, "%26"));
}
AjaxPostUtil.request({url:reqBasePath + "codemodel014", params:{jsonData: JSON.stringify(subData)}, type:'json', callback:function(json){
if(json.returnCode == 0){
diff --git a/skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js b/skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
index d951965ee616555721976aaf6ca9b917ba468ace..ae98eed3982fe679cbe0172d1cba8799a891fcc7 100644
--- a/skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
+++ b/skyeye-web/src/main/webapp/js/rmgroupmember/rmgroupmemberlist.js
@@ -17,7 +17,7 @@ layui.config({
var editor = CodeMirror.fromTextArea(document.getElementById("modelContent"), {
mode : "text/x-java", // 模式
theme : "eclipse", // CSS样式选择
- indentUnit : 2, // 缩进单位,默认2
+ indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
tabSize : 4, // Tab缩进,默认4
readOnly : true, // 是否只读,默认false
diff --git a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyadd.js b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyadd.js
index ac469fe125b5aadd8ae9a5c3ca6b11c2ce2457c2..73dc0f40ccfa807989649e723cbb2b17006cf375 100644
--- a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyadd.js
+++ b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyadd.js
@@ -1,7 +1,8 @@
layui.config({
base: basePath,
version: skyeyeVersion
-}).define(['jquery', 'winui', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx', 'solr', 'sql', 'vue'], function (exports) {
+}).define(['jquery', 'winui', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx',
+ 'solr', 'sql', 'vue'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
@@ -10,8 +11,60 @@ layui.config({
form.render();
- var editor = CodeMirror.fromTextArea(document.getElementById("htmlContent"), {
- mode : "text/x-java", // 模式
+ var htmlModelContent = CodeMirror.fromTextArea(document.getElementById("htmlModelContent"), {
+ mode : "xml", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : true, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ var jsModelContent = CodeMirror.fromTextArea(document.getElementById("jsModelContent"), {
+ mode : "text/javascript", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : true, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ var htmlContent = CodeMirror.fromTextArea(document.getElementById("htmlContent"), {
+ mode : "xml", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : false, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ var jsContent = CodeMirror.fromTextArea(document.getElementById("jsContent"), {
+ mode : "text/javascript", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : false, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ var jsRelyOnContent = CodeMirror.fromTextArea(document.getElementById("jsRelyOnContent"), {
+ mode : "text/javascript", // 模式
theme : "eclipse", // CSS样式选择
indentUnit : 4, // 缩进单位,默认2
smartIndent : true, // 是否智能缩进
@@ -23,18 +76,47 @@ layui.config({
matchBrackets: true,
});
+ //展现形式
+ showGrid({
+ id: "dsFormContentId",
+ url: reqBasePath + "dsform006",
+ params: {},
+ pagination: false,
+ template: getFileContent('tpl/template/select-option.tpl'),
+ ajaxSendLoadBefore: function(hdb){
+ },
+ ajaxSendAfter:function(json){
+ form.render('select');
+ }
+ });
+
form.on('select(selectParent)', function(data){
-
+ AjaxPostUtil.request({url:reqBasePath + "dsform007", params:{rowId: data.value}, type:'json', callback:function(json){
+ if(json.returnCode == 0){
+ htmlModelContent.setValue(json.bean.htmlContent);
+ jsModelContent.setValue(json.bean.jsContent);
+ htmlContent.setValue(json.bean.htmlContent);
+ jsContent.setValue(json.bean.jsContent);
+ }else{
+ top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
+ }
+ }});
});
form.on('submit(formAddBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
-
+ title:$("#title").val(),
+ propertyTag:$("#propertyTag").val(),
+ dsFormContentId:$("#dsFormContentId").val(),
+ propertyOut:data.field.propertyOut,
+ htmlContent:encodeURI(htmlContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
+ jsContent:encodeURI(jsContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
+ jsRelyOn:encodeURI(jsRelyOnContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
};
- AjaxPostUtil.request({url:reqBasePath "icon002", params:params, type:'json', callback:function(json){
+ AjaxPostUtil.request({url:reqBasePath + "rmproperty002", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
diff --git a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyedit.js b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyedit.js
index 1b895777a83b21eaf7db3e9f78c78ff706a7cb66..ebf2be3caffbdc0d0d18ea52e398bfb15b061703 100644
--- a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyedit.js
+++ b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertyedit.js
@@ -1,16 +1,18 @@
layui.config({
base: basePath,
version: skyeyeVersion
-}).define(['jquery', 'winui'], function (exports) {
+}).define(['jquery', 'winui', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx',
+ 'solr', 'sql', 'vue'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
var $ = layui.$,
form = layui.form;
+ var htmlModelContent, jsModelContent, htmlContent, jsContent, jsRelyOnContent;
showGrid({
id: "showForm",
- url: reqBasePath "icon004",
+ url: reqBasePath + "rmproperty004",
params: {rowId: parent.rowId},
pagination: false,
template: getFileContent('tpl/rmproperty/rmpropertyeditTemplate.tpl'),
@@ -18,20 +20,118 @@ layui.config({
},
ajaxSendAfter:function(json){
+ htmlModelContent = CodeMirror.fromTextArea(document.getElementById("htmlModelContent"), {
+ mode : "xml", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : true, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ jsModelContent = CodeMirror.fromTextArea(document.getElementById("jsModelContent"), {
+ mode : "text/javascript", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : true, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ htmlContent = CodeMirror.fromTextArea(document.getElementById("htmlContent"), {
+ mode : "xml", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : false, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ jsContent = CodeMirror.fromTextArea(document.getElementById("jsContent"), {
+ mode : "text/javascript", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : false, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ jsRelyOnContent = CodeMirror.fromTextArea(document.getElementById("jsRelyOnContent"), {
+ mode : "text/javascript", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : false, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
+ $("input:radio[name=propertyOut][value=" + json.bean.propertyOut + "]").prop("checked", true);
+
form.render();
+
+ //展现形式
+ showGrid({
+ id: "dsFormContentId",
+ url: reqBasePath + "dsform006",
+ params: {},
+ pagination: false,
+ template: getFileContent('tpl/template/select-option.tpl'),
+ ajaxSendLoadBefore: function(hdb){
+ },
+ ajaxSendAfter:function(data){
+ $("#dsFormContentId").val(json.bean.dsFormContentId);
+ form.render('select');
+ }
+ });
form.on('select(selectParent)', function(data){
-
+ AjaxPostUtil.request({url:reqBasePath + "dsform007", params:{rowId: data.value}, type:'json', callback:function(json){
+ if(json.returnCode == 0){
+ htmlModelContent.setValue(json.bean.htmlContent);
+ jsModelContent.setValue(json.bean.jsContent);
+ htmlContent.setValue(json.bean.htmlContent);
+ jsContent.setValue(json.bean.jsContent);
+ }else{
+ top.winui.window.msg(json.returnMessage, {icon: 2,time: 2000});
+ }
+ }});
});
form.on('submit(formEditBean)', function (data) {
//表单验证
if (winui.verifyForm(data.elem)) {
var params = {
-
+ title:$("#title").val(),
+ propertyTag:$("#propertyTag").val(),
+ dsFormContentId:$("#dsFormContentId").val(),
+ propertyOut:data.field.propertyOut,
+ htmlContent:encodeURI(htmlContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
+ jsContent:encodeURI(jsContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
+ jsRelyOn:encodeURI(jsRelyOnContent.getValue().replace(/\+/g, "%2B").replace(/\&/g, "%26")),
+ rowId:parent.rowId
};
- AjaxPostUtil.request({url:reqBasePath "icon005", params:params, type:'json', callback:function(json){
+ AjaxPostUtil.request({url:reqBasePath + "rmproperty005", params:params, type:'json', callback:function(json){
if(json.returnCode == 0){
parent.layer.close(index);
parent.refreshCode = '0';
diff --git a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertylist.js b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertylist.js
index f2c8b58701fe11877d278c8e89ff3035b456f692..d8084f79bbeba9cc75889da7a1d17bb3bd50d2e6 100644
--- a/skyeye-web/src/main/webapp/js/rmproperty/rmpropertylist.js
+++ b/skyeye-web/src/main/webapp/js/rmproperty/rmpropertylist.js
@@ -4,7 +4,8 @@ var rowId = "";
layui.config({
base: basePath,
version: skyeyeVersion
-}).define(['table', 'jquery', 'winui', 'form'], function (exports) {
+}).define(['table', 'jquery', 'winui', 'form', 'codemirror', 'xml', 'clike', 'css', 'htmlmixed', 'javascript', 'nginx',
+ 'solr', 'sql', 'vue'], function (exports) {
winui.renderColor();
@@ -16,20 +17,57 @@ layui.config({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
- url: reqBasePath 'rmxcx001',
- where:{},
+ url: reqBasePath + 'rmproperty001',
+ where:{title: $("#title").val(), propertyTag: $("#propertyTag").val(), dsFormContentId: $("#dsFormContentId").val()},
even:true, //隔行变色
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: '序号', type: 'numbers'},
-
+ { field: 'title', title: '属性别名', width: 180 },
+ { field: 'propertyTag', title: '属性标签', width: 180 },
+ { field: 'propertyOut', title: '外部属性', width: 150 },
+ { field: 'contentName', title: '展现形式', width: 180 },
+ { field: 'id', title: 'HTML内容', width: 180, templet: function(d){
+ if(!isNull(d.htmlContent)){
+ return '';
+ }else{
+ return '无';
+ }
+ }},
+ { field: 'id', title: 'JS内容', width: 180, templet: function(d){
+ if(!isNull(d.jsContent)){
+ return '';
+ }else{
+ return '无';
+ }
+ }},
+ { field: 'id', title: 'JS依赖文件', width: 180, templet: function(d){
+ if(!isNull(d.jsRelyOn)){
+ return '';
+ }else{
+ return '无';
+ }
+ }},
{ field: 'createTime', title: '创建时间', width: 180 },
{ title: '操作', fixed: 'right', align: 'center', width: 240, toolbar: '#tableBar'}
]]
});
+ var editor = CodeMirror.fromTextArea(document.getElementById("modelContent"), {
+ mode : "text/x-java", // 模式
+ theme : "eclipse", // CSS样式选择
+ indentUnit : 4, // 缩进单位,默认2
+ smartIndent : true, // 是否智能缩进
+ tabSize : 4, // Tab缩进,默认4
+ readOnly : true, // 是否只读,默认false
+ showCursorWhenSelecting : true,
+ lineNumbers : true, // 是否显示行号
+ styleActiveLine: true, //line选择是是否加亮
+ matchBrackets: true,
+ });
+
table.on('tool(messageTable)', function (obj) { //注:tool是工具条事件名,test是table原始容器的属性 lay-filter="对应的值"
var data = obj.data; //获得当前行数据
var layEvent = obj.event; //获得 lay-event 对应的值
@@ -37,6 +75,48 @@ layui.config({
del(data, obj);
}else if (layEvent === 'edit') { //编辑
edit(data);
+ }else if (layEvent === 'htmlContent') { //HTML内容
+ var mode = returnModel('html');
+ if (!isNull(mode.length)) {
+ editor.setOption('mode', mode)
+ }
+ editor.setValue(data.htmlContent);
+ layer.open({
+ id: 'HTML内容',
+ type: 1,
+ title: 'HTML内容',
+ shade: 0.3,
+ area: ['1200px', '600px'],
+ content: $("#modelContentDiv").html(),
+ });
+ }else if (layEvent === 'jsContent') { //JS内容
+ var mode = returnModel('javascript');
+ if (!isNull(mode.length)) {
+ editor.setOption('mode', mode)
+ }
+ editor.setValue(data.jsContent);
+ layer.open({
+ id: 'HTML-JS内容',
+ type: 1,
+ title: 'HTML-JS内容',
+ shade: 0.3,
+ area: ['1200px', '600px'],
+ content: $("#modelContentDiv").html(),
+ });
+ }else if (layEvent === 'jsRelyOn') { //JS依赖文件
+ var mode = returnModel('javascript');
+ if (!isNull(mode.length)) {
+ editor.setOption('mode', mode)
+ }
+ editor.setValue(data.jsRelyOn);
+ layer.open({
+ id: 'HTML-JS内容',
+ type: 1,
+ title: 'HTML-JS内容',
+ shade: 0.3,
+ area: ['1200px', '600px'],
+ content: $("#modelContentDiv").html(),
+ });
}
});
@@ -50,13 +130,27 @@ layui.config({
return false;
});
+ //展现形式
+ showGrid({
+ id: "dsFormContentId",
+ url: reqBasePath + "dsform006",
+ params: {},
+ pagination: false,
+ template: getFileContent('tpl/template/select-option.tpl'),
+ ajaxSendLoadBefore: function(hdb){
+ },
+ ajaxSendAfter:function(json){
+ form.render('select');
+ }
+ });
+
//删除
function del(data, obj){
- var msg = obj ? '确认删除小程序样式属性【' obj.data.rmTypeName '】吗?' : '确认删除选中数据吗?';
- layer.confirm(msg, { icon: 3, title: '删除小程序样式属性' }, function (index) {
+ var msg = obj ? '确认删除样式属性【' + obj.data.title + '】吗?' : '确认删除选中数据吗?';
+ layer.confirm(msg, { icon: 3, title: '删除样式属性' }, function (index) {
layer.close(index);
//向服务端发送删除指令
- AjaxPostUtil.request({url:reqBasePath "rmxcx003", params:{rowId: data.id}, type:'json', callback:function(json){
+ AjaxPostUtil.request({url:reqBasePath + "rmproperty003", params:{rowId: data.id}, type:'json', callback:function(json){
if(json.returnCode == 0){
top.winui.window.msg("删除成功", {icon: 1,time: 2000});
loadTable();
@@ -106,7 +200,7 @@ layui.config({
});
function loadTable(){
- table.reload("messageTable", {where:{}});
+ table.reload("messageTable", {where:{title: $("#title").val(), propertyTag: $("#propertyTag").val(), dsFormContentId: $("#dsFormContentId").val()}});
}
exports('rmpropertylist', {});
diff --git a/skyeye-web/src/main/webapp/tpl/rmproperty/rmpropertyadd.html b/skyeye-web/src/main/webapp/tpl/rmproperty/rmpropertyadd.html
index 5ce8479b9f9522a36e3a33bb7b6ffda8609b1dab..992a739ab28321e1c83ab2b18eed0c66de8dba5a 100644
--- a/skyeye-web/src/main/webapp/tpl/rmproperty/rmpropertyadd.html
+++ b/skyeye-web/src/main/webapp/tpl/rmproperty/rmpropertyadd.html
@@ -6,42 +6,67 @@
+