sysQueryMetaFieldEditDetail.jsp 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html ng-app="sysQueryFieldApp">
  4. <head>
  5. <%@include file="/commons/include/form.jsp" %>
  6. <link href="${ctx}/styles/default/css/hotent/dataRights.css" rel="stylesheet" />
  7. <script type="text/javascript" src="${ctx}/js/angular/angular.min.js"></script>
  8. <script type="text/javascript"src="${ctx}/js/angular/service/baseServices.js"></script>
  9. <script type="text/javascript" src="${ctx}/js/angular/module/DataRightsApp.js"></script>
  10. <script type="text/javascript" src="${ctx}/js/angular/service/sysQuerySqlService.js"></script>
  11. <script type="text/javascript" src="${ctx}/js/angular/service/sysQueryFieldService.js"></script>
  12. <script type="text/javascript" src="${ctx}/js/angular/controller/sysQueryFieldController.js"></script>
  13. <title>设置字段信息 </title>
  14. <style>
  15. tr{
  16. height:40px;
  17. }
  18. </style>
  19. </head>
  20. <body ng-controller="sysQueryMetaFieldCtrl">
  21. <div class="panel" ng-if="type=='ctrlType'" ng-controller="sysQueryMetaFieldCtrlTypeCtrl">
  22. <dialog-buttons></dialog-buttons>
  23. <form >
  24. <div class="panel-detail">
  25. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  26. <tr>
  27. <th >字段描述:</th><td>{{sysQueryField.fieldDesc}}</td>
  28. <th >字段名称:</th><td>{{sysQueryField.name}}</td>
  29. </tr>
  30. <tr>
  31. <th >字段类型:</th><td >{{sysQueryField.dataType}}</td>
  32. <th >控件类型:</th>
  33. <td >
  34. <select ng-model="sysQueryField.controlType" class="ht-input" style="width: 150px;" ng-options="k as v for (k,v) in util.getControlTypeJson(sysQueryField.dataType)" >
  35. <option value="">请选择</option>
  36. </select>
  37. </td>
  38. </tr>
  39. <tr ng-if="sysQueryField.controlType==12">
  40. <th >自定义对话框:</th>
  41. <td >
  42. <select ng-model="sysQueryField.ctrlCon.dialog" ng-options="c.alias as c.name for c in dialogList" ng-change="changeDialog(c)" class="ht-input" style="width: 150px;"> </select>
  43. </td>
  44. <th >对话框返回字段选择:</th>
  45. <td >
  46. <select ng-model="sysQueryField.ctrlCon.resultField" ng-options="c.field as c.comment for c in currentDialog.resultfield" class="ht-input" style="width: 150px;"></select>
  47. </td>
  48. </tr>
  49. <tr ng-if="sysQueryField.controlType==3">
  50. <th >数据字典类型:</th>
  51. <td colspan="3">
  52. <select ng-model="sysQueryField.dicType" ng-options="c.nodeKey as c.typeName for c in globalTypes" class="ht-input" style="width: 150px;">
  53. <option value = "">请选择</option>
  54. </select>
  55. </td>
  56. </tr>
  57. <tr ng-if="sysQueryField.controlType==15">
  58. <th >日期格式:</th>
  59. <td colspan="3">
  60. <select ng-model="sysQueryField.dateFormat" class="ht-input" style="width:180px">
  61. <option value ="">请选择</option>
  62. <option value="yyyy-MM-dd">yyyy-MM-dd</option>
  63. <option value="yyyy-MM-dd HH:mm:ss">yyyy-MM-dd HH:mm:ss</option>
  64. <option value="yyyy-MM-dd HH:mm:00">yyyy-MM-dd HH:mm:00</option>
  65. <option value="HH:mm:ss">HH:mm:ss</option>
  66. </select>
  67. </td>
  68. </tr>
  69. <tr ng-if="sysQueryField.controlType==11">
  70. <th >下拉选项:</th>
  71. <td colspan="5">
  72. <select-table list="selectList"></select-table>
  73. </td>
  74. </tr>
  75. </table>
  76. </div>
  77. </form>
  78. </div>
  79. <div class="panel" ng-if="type=='alarmSetting'" ng-controller="sysQueryMetaFieldAlarmCtrl">
  80. <dialog-buttons></dialog-buttons>
  81. <form>
  82. <div class="panel-detail">
  83. <table class="table-detail" cellpadding="0" cellspacing="0"
  84. border="0">
  85. <tr>
  86. <th width=100>字段描述:</th>
  87. <td>{{sysQueryField.fieldDesc}}</td>
  88. <th width=100>字段名称:</th>
  89. <td>{{sysQueryField.name}}</td>
  90. </tr>
  91. <tr>
  92. <th width=100>字段类型:</th>
  93. <td colspan="3">{{sysQueryField.dataType}}</td>
  94. </tr>
  95. </table>
  96. <fieldset>
  97. <legend class="legend" onclick="$(this).next().toggle()" title="单击展开/收缩"> 预警规则 </legend>
  98. <table class="table-detail" cellpadding="0" cellspacing="0"
  99. border="0">
  100. <tr ng-repeat="as in alarmSetting" style="height: 50px;">
  101. <th width="20%" style="text-align:center;color:{{as.color}};font-weight:bolder;">颜色
  102. <input type="color" class="ht-input" ng-model="as.color" style="width:50px;"/>
  103. </th>
  104. <td>
  105. <div ng-repeat="cd in as.condition track by $index" style="float: left;margin:5px 0 5px 5px;">
  106. <select ng-model="cd.op" class="ht-input" style="width:70px;height: 30px;float: left;">
  107. <option value=">">大于</option>
  108. <option value="<">小于</option>
  109. <option value="=">等于</option>
  110. <option value=">=">大于等于</option>
  111. <option value="<=">小于等于</option>
  112. </select>
  113. <input type="text" ng-model="cd.val" class="ht-input" style="width:50px;float: left; margin-left: 5px; text-align: center;"/>
  114. <span ng-if="as.condition.length>0&&!$last" style="float: left;" class="and_button">and</span>
  115. <span ng-if="$last" ng-click="addCondition(as.condition)" class="plus_button_default" style="margin-left: 10px;float: left;">+</span>
  116. </div>
  117. <span class="plus_button_info" ng-if="$last" style="float: right;margin-top: 7px;" ng-click="addAlarmSetting()">+</span>
  118. <span class="plus_button_danger" ng-if="alarmSetting.length>1" style="float: right;margin-top: 7px;margin-right: 5px;" ng-click="service.util.delTr(alarmSetting,$index)">-</span>
  119. </td>
  120. </tr>
  121. </table>
  122. </fieldset>
  123. <fieldset style="margin-top: 10px;padding: 0px 15px 20px 10px ;">
  124. <legend class="legend" onclick="$(this).next().toggle()" title="单击展开/收缩"> 表格格式设置
  125. </legend>
  126. <div class="tipbox">
  127. <a href="javascript:;" class="tipinfo">
  128. <span>这个格式javascript代码。代码返回列格式化后的结果,这些代码作为function sex_Formater(cellvalue, options, rowObject){},函数体的一部分。[cellvalue]:为列代表的值,[rowObject]:表示为一行数据,可以通过 rowObject.sex类似的代码获取改行其他列的数据。</span>
  129. </a>
  130. </div>
  131. <br>
  132. <textarea rows="8" ng-model="sysQueryField.formater"
  133. class="w100 h100 margin-none" style="resize: none;margin-top: 50px;"></textarea>
  134. </fieldset>
  135. </div>
  136. </form>
  137. </div>
  138. <div class="panel" ng-if="type=='virtualSetting'" ng-controller="sysQueryMetaFieldVirtualCtrl">
  139. <dialog-buttons></dialog-buttons>
  140. <form >
  141. <div class="panel-detail">
  142. <table class="table-detail" cellpadding="0" cellspacing="0" border="0">
  143. <tr>
  144. <th width=100>字段名称:</th>
  145. <td>
  146. <input type="text" ng-model="sysQueryField.name" class="ht-input" />
  147. </td>
  148. </tr>
  149. <tr>
  150. <th width=100>字段描述:</th>
  151. <td>
  152. <input type="text" ng-model="sysQueryField.fieldDesc" class="ht-input" />
  153. </td>
  154. </tr>
  155. <tr>
  156. <th width=100>关联字段:</th>
  157. <td >
  158. {{sysQueryField.virtualFrom}}
  159. </td>
  160. </tr>
  161. <tr>
  162. <th width=100>数据来自于:</th>
  163. <td >
  164. {{service.getVirtualFromType(sysQueryField.resultFromType)}}
  165. <div class="tipbox" ng-if="sysQueryField.resultFromType==2">
  166. <a href="javascript:;" class="tipinfo">
  167. <span>SQL语句的写法,实例如下:<br/>
  168. select userName from userId=#CON#<br/>
  169. #CON#:表示源字段的值<br/>
  170. 这个语句返回一个值。<br/>
  171. </span>
  172. </a>
  173. </div>
  174. </td>
  175. </tr>
  176. <tr ng-if="sysQueryField.resultFromType==2">
  177. <th width=100>来源配置:</th>
  178. <td >
  179. <textarea type="text" ng-model="sysQueryField.resultFrom" rows="5"
  180. style="padding: 15px 0 0 0px;resize: none" class="w100 h100 border-none margin-none "></textarea>
  181. </td>
  182. </tr>
  183. </table>
  184. </div>
  185. </form>
  186. </div>
  187. <div class="panel" ng-if="type=='sqlSetting'" ng-controller="sysQueryMetaSqlSettingCtrl">
  188. <dialog-buttons></dialog-buttons>
  189. <form >
  190. <div class="panel-detail">
  191. <table class="table-detail" cellpadding="0" cellspacing="0"
  192. border="0">
  193. <tr>
  194. <th width=100>字段描述:</th>
  195. <td>{{sysQueryField.fieldDesc}}</td>
  196. <th width=100>字段名称:</th>
  197. <td>{{sysQueryField.name}}</td>
  198. </tr>
  199. <tr>
  200. <th width=100>字段类型:</th>
  201. <td colspan="3">{{sysQueryField.dataType}}</td>
  202. </tr>
  203. <tr>
  204. <th width=100>SQL:</th>
  205. <td colspan="3">
  206. <textarea type="text" ng-model="sysQueryField.resultFrom" rows="5"
  207. style="padding: 15px 0 0 0px;resize: none" class="w100 h100 border-none margin-none "></textarea>
  208. </td>
  209. </tr>
  210. </table>
  211. </div>
  212. </form>
  213. </div>
  214. </body>
  215. </html>