2025-12-18康农种业项目初始化
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
.customButton_class_box {
|
||||
width: 100%;
|
||||
line-height: 24px;
|
||||
height:24px;
|
||||
color: #1f85ec;
|
||||
cursor: pointer;
|
||||
font-family: "Microsoft YaHei"!important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break:keep-all;
|
||||
}
|
||||
.customButton_box_content{
|
||||
width: 100%;
|
||||
height: 24px;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing : border-box;
|
||||
-moz-box-sizing : border-box;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
border: 1px solid #1f85ec;
|
||||
background-color: #fff;
|
||||
border-radius: 15px;
|
||||
-webkit-border-radius: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 101 KiB |
@@ -0,0 +1,13 @@
|
||||
.relation_container .panel_bottom .zidong_guanlian .guanlian_map{
|
||||
padding-left: 10px;
|
||||
}
|
||||
.relation_container .panel_bottom .zidong_guanlian .guanlian_map .error-title{
|
||||
margin: 0 2px;
|
||||
visibility: hidden;
|
||||
}
|
||||
.relation_container .panel_bottom .zidong_guanlian .guanlian_map .error-title.active{
|
||||
visibility: visible;
|
||||
}
|
||||
.relation_container .biz_groupguanlian .div_sel3.active{
|
||||
border-color: red;
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
body{
|
||||
font-family: "microsoft yahei";
|
||||
}
|
||||
#tab {
|
||||
height: 26px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #666666;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#tab span {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
width: 50%;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
margin-right: 20px;
|
||||
padding: 0 5px 0 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tab span.select {
|
||||
border-bottom: 2px solid #2453b3;
|
||||
color: #2453b3;
|
||||
}
|
||||
|
||||
.list{
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
height: 310px;
|
||||
overflow: auto;
|
||||
}
|
||||
.list .active{
|
||||
background-color: #1F85EC;
|
||||
border: 1px solid #1F85EC;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.list li{
|
||||
cursor: pointer;
|
||||
margin: 3px 0 3px 0;
|
||||
}
|
||||
.list span{
|
||||
display: inline-block;
|
||||
background: url("img/icon16.png") -32px -240px no-repeat scroll transparent;
|
||||
margin-right: 2px;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.search-box {
|
||||
height: 20px;
|
||||
margin: 10px 0 10px 0;
|
||||
position: relative;
|
||||
}
|
||||
.cap-icon-sousuo {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 170px;
|
||||
color: #1F85EC;
|
||||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cap-icon-sousuo:before {
|
||||
content: "";
|
||||
background: url("img/icon16.png") -192px -176px no-repeat;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
width: 16px;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.search-input {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #D4D4D4;
|
||||
border-radius: 100px;
|
||||
min-height: 20px;
|
||||
width: 150px;
|
||||
padding-right: 35px;
|
||||
padding-left: 10px;
|
||||
outline: none;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../css/setTemplate.css"/>
|
||||
<script src="/seeyon/m3/apps/v5/commons/jquery/jquery-2.1.4.min.js"></script>
|
||||
<script src="../js/setTemplate.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tab">
|
||||
<span id="tab_queryList" class="select">选择底表</span>
|
||||
</div>
|
||||
|
||||
<div id="queryList">
|
||||
<div class="search-box">
|
||||
<i class="cap-icon-sousuo" onclick="search()"></i>
|
||||
<input type="text" class="search-input" id="search_query">
|
||||
</div>
|
||||
<ul class="list"></ul>
|
||||
</div>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
|
||||
//----------------------------------
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,128 @@
|
||||
(function(f){
|
||||
var nameSpace = 'field_32489273489134023';
|
||||
if(!window[nameSpace]){
|
||||
var Builder = f();
|
||||
window[nameSpace] = {
|
||||
instance: {}
|
||||
};
|
||||
window[nameSpace].init = function (options) {
|
||||
window[nameSpace].instance[options.privateId] = new Builder(options);
|
||||
};
|
||||
}
|
||||
})(function(){
|
||||
/**
|
||||
* 构造函数
|
||||
* @param options
|
||||
* @constructor
|
||||
*/
|
||||
function App(options) {
|
||||
var self = this;
|
||||
//初始化参数
|
||||
self.initParams(options);
|
||||
//初始化dom
|
||||
self.initDom();
|
||||
//事件
|
||||
self.events();
|
||||
}
|
||||
|
||||
App.prototype = {
|
||||
initParams : function (options) {
|
||||
var self = this;
|
||||
self.adaptation = options.adaptation;
|
||||
self.adaptation.formMessage = options.formMessage;
|
||||
self.privateId = options.privateId;
|
||||
self.messageObj = options.getData;
|
||||
self.preUrl = options.url_prefix;
|
||||
},
|
||||
initDom : function () {
|
||||
var self = this;
|
||||
dynamicLoading.css(self.preUrl + 'css/formQueryBtn.css');
|
||||
self.appendChildDom();
|
||||
},
|
||||
events : function () {
|
||||
var self = this;
|
||||
// 监听是否数据刷新
|
||||
self.adaptation.ObserverEvent.listen('Event' + self.privateId, function() {
|
||||
self.messageObj = self.adaptation.childrenGetData(self.privateId);
|
||||
self.appendChildDom();
|
||||
});
|
||||
},
|
||||
appendChildDom : function () {
|
||||
var self = this;
|
||||
var domStructure = '<section class="customButton_box_content">'+
|
||||
'<div class="customButton_class_box '+ self.privateId + '" title="' + self.messageObj.display.escapeHTML() + '">'+ self.messageObj.display.escapeHTML() +'</div>'+
|
||||
'</section>';
|
||||
document.querySelector('#' + self.privateId).innerHTML = domStructure;
|
||||
var jumpFun = function() {
|
||||
var result = confirm('是否更新实名认证二维码!');
|
||||
//var url = urlSrc+"/zhxz/zyYcsq?sn=SK-20230808-001";
|
||||
var contentDataId= self.messageObj.formdata.alldata.content.contentDataId; // 原表单id
|
||||
var title= self.messageObj.formdata.alldata.content.title; // 模板名称
|
||||
var userId= self.messageObj.formdata.alldata.user.id; // 当前用户id
|
||||
var name= self.messageObj.formdata.alldata.user.name; // 当前用户名称
|
||||
var loginName= self.messageObj.formdata.alldata.user.loginName; // 当前用户账号
|
||||
var auth= self.messageObj.formdata.auth;
|
||||
if(result){
|
||||
$.ajax({
|
||||
//请求url
|
||||
contentType:"application/json",
|
||||
url: 'http://223.75.120.166:8888/seeyon/newErCodeServlet',
|
||||
//请求参数
|
||||
data: {"id":contentDataId},
|
||||
//请求类型
|
||||
type: 'POST',
|
||||
//响应体结果设置
|
||||
dataType: 'json',
|
||||
//成功的回调函数
|
||||
success: function(data){
|
||||
if("200"==data.code){
|
||||
alert(data.msg);
|
||||
}else{
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
//失败的回调函数
|
||||
error: function(){
|
||||
alert("二维码更新失败!");
|
||||
}
|
||||
});
|
||||
}else{
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
document.querySelector('.' + self.privateId).removeEventListener('click', jumpFun);
|
||||
document.querySelector('.' + self.privateId).addEventListener('click', jumpFun);
|
||||
//渲染隐藏权限
|
||||
if (self.messageObj.auth === 'hide') {
|
||||
document.querySelector('#' + self.privateId).innerHTML = '<div class="cap4-text__browse" style="line-height: 1.8; color: rgb(0, 0, 0) !important;">***</div>';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var dynamicLoading = {
|
||||
css: function(path) {
|
||||
if(!path || path.length === 0) {
|
||||
throw new Error('argument "path" is required !');
|
||||
}
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var link = document.createElement('link');
|
||||
link.href = path;
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
head.appendChild(link);
|
||||
},
|
||||
js: function(path) {
|
||||
if(!path || path.length === 0) {
|
||||
throw new Error('argument "path" is required !');
|
||||
}
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var script = document.createElement('script');
|
||||
script.src = path;
|
||||
script.type = 'text/javascript';
|
||||
head.appendChild(script);
|
||||
}
|
||||
}
|
||||
|
||||
return App;
|
||||
});
|
||||
@@ -0,0 +1,29 @@
|
||||
(function(factory){
|
||||
var nameSpace = 'field_4793655815239859651';
|
||||
// 解决当前页面有多个相同自定义控件产生冲突的问题
|
||||
if(!window[nameSpace]){
|
||||
var Builder = factory();
|
||||
window[nameSpace] = {
|
||||
instance: {}
|
||||
};
|
||||
window[nameSpace].init = function (options) {
|
||||
// 存放当前对象的实例,privateId不同,所有不会重复
|
||||
window[nameSpace].instance[options.privateId] = new Builder(options);
|
||||
};
|
||||
}
|
||||
|
||||
})(function(){
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
* @param options
|
||||
* @constructor
|
||||
*/
|
||||
function App(options) {
|
||||
alert("初始化自定义控件");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return App;
|
||||
});
|
||||
@@ -0,0 +1,99 @@
|
||||
var unflowList, param, loading, process;
|
||||
$(document).ready(function() {
|
||||
param = initParam().params;// 获取页面参数
|
||||
// 处理进度条
|
||||
process = top.$.progressBar({
|
||||
text : "加载中..."
|
||||
});
|
||||
loading = true;
|
||||
getUnflowList();
|
||||
});
|
||||
|
||||
|
||||
// 获取底表
|
||||
function getUnflowList() {
|
||||
$.ajax({
|
||||
url : "/seeyon/rest/cap4/unflow/select",
|
||||
async : true,
|
||||
success : function(data) {
|
||||
// 处理进度条
|
||||
if (loading)
|
||||
process.close();
|
||||
loading = false;
|
||||
//data = JSON.parse(data);
|
||||
var result = data.data;
|
||||
unflowList = result;
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
$("#queryList ul").append(
|
||||
$("<li id='"
|
||||
+ result[i].id
|
||||
+ "'><span class='icon'></span>"
|
||||
+ result[i].name
|
||||
+ "</li>").attr("info",
|
||||
JSON.stringify(result[i])));
|
||||
}
|
||||
$("#queryList ul").delegate(
|
||||
"li",
|
||||
"click",
|
||||
function() {
|
||||
$(this).siblings().removeClass('active').end()
|
||||
.addClass('active');
|
||||
});
|
||||
if (param && param.id) { // 激活当前项
|
||||
$('#' + param.id).trigger('click');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function search() {
|
||||
var searchValue = $("#search_query").val();
|
||||
$("#queryList ul").empty();
|
||||
for (var i = 0; i < unflowList.length; i++) {
|
||||
if (unflowList[i].name.indexOf(searchValue) != -1) {
|
||||
$("#queryList ul").append(
|
||||
$("<li><span class='icon'></span>"
|
||||
+ unflowList[i].name + "</li>").attr(
|
||||
"info", JSON.stringify(unflowList[i])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 返回参数获取
|
||||
function getResult() {
|
||||
return JSON.parse($("#queryList ul").find(".active").attr("info")
|
||||
|| "{}");
|
||||
}
|
||||
|
||||
// --------------------以下为固定方法,需要实现返回参数获取--------------
|
||||
|
||||
// 获取弹窗传递过来的参数
|
||||
function initParam() {
|
||||
var obj = window.parentDialogObj && (window.parentDialogObj["ctrlDialog"]);// 获取窗口对象
|
||||
if (obj && obj.getTransParams) {
|
||||
// 然后通过V5方法获取弹窗传递过来的参数
|
||||
return obj.getTransParams();
|
||||
}
|
||||
}
|
||||
|
||||
// 确定按钮调用方法,返回需要的json数据
|
||||
function OK() {
|
||||
var result = getResult();
|
||||
|
||||
if (param && param.designId !== result.designId)
|
||||
return {
|
||||
valid : true,
|
||||
data : {
|
||||
customParam : {
|
||||
templateId : result,
|
||||
mapping : null
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
valid : true,
|
||||
data : result
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user