|
@@ -47,8 +47,15 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="form-group">
|
|
|
|
+ <label class="col-sm-2 control-label is-required">接口来源</label>
|
|
|
|
+ <div class="col-sm-4">
|
|
|
|
+ <select class='form-control' id="shareType" name='shareType' onchange="changeShareType()">
|
|
|
|
+ <option value="share_type_1">市共享</option>
|
|
|
|
+ <option value="share_type_4">省共享</option>
|
|
|
|
+ </select>
|
|
|
|
+ </div>
|
|
<label class="col-sm-2 control-label is-required">接口提供部门</label>
|
|
<label class="col-sm-2 control-label is-required">接口提供部门</label>
|
|
- <div class="col-sm-10">
|
|
|
|
|
|
+ <div class="col-sm-4">
|
|
<div class="input-group">
|
|
<div class="input-group">
|
|
<input name="provideDeptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
|
|
<input name="provideDeptName" onclick="selectDeptTree()" id="treeName" type="text" placeholder="请选择归属部门" class="form-control" required>
|
|
<input name="provideDeptId" type="hidden" id="treeId"/>
|
|
<input name="provideDeptId" type="hidden" id="treeId"/>
|
|
@@ -103,6 +110,11 @@
|
|
<th:block th:include="include :: select2-js" />
|
|
<th:block th:include="include :: select2-js" />
|
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
|
<th:block th:include="include :: bootstrap-fileinput-js" />
|
|
<script th:inline="javascript">
|
|
<script th:inline="javascript">
|
|
|
|
+ function changeShareType(){
|
|
|
|
+ let shareType = $("#shareType").val();
|
|
|
|
+ // alert(shareType)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
let prefix = ctx + "system";
|
|
let prefix = ctx + "system";
|
|
let datas = [[${@dict.getType('share_type')}]];
|
|
let datas = [[${@dict.getType('share_type')}]];
|
|
@@ -206,9 +218,11 @@
|
|
|
|
|
|
/**选择部门树**/
|
|
/**选择部门树**/
|
|
function selectDeptTree() {
|
|
function selectDeptTree() {
|
|
|
|
+ let shareType = $("#shareType").val();
|
|
var treeId = $("#treeId").val();
|
|
var treeId = $("#treeId").val();
|
|
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
|
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
|
- var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
|
|
|
|
|
+ // var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
|
|
|
+ var url = ctx + "system/dept/selectDeptTreeByShareType/" + deptId + "/" + shareType;
|
|
var options = {
|
|
var options = {
|
|
title: '选择部门',
|
|
title: '选择部门',
|
|
width: "380",
|
|
width: "380",
|
|
@@ -220,7 +234,8 @@
|
|
|
|
|
|
function doSubmit(index, layero){
|
|
function doSubmit(index, layero){
|
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
|
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
|
- if ($.tree.notAllowParents(tree)) {
|
|
|
|
|
|
+ // if ($.tree.notAllowParents(tree)) {
|
|
|
|
+ if (true) {//不能选择根节点
|
|
var body = layer.getChildFrame('body', index);
|
|
var body = layer.getChildFrame('body', index);
|
|
$("#treeId").val(body.find('#treeId').val());
|
|
$("#treeId").val(body.find('#treeId').val());
|
|
$("#treeName").val(body.find('#treeName').val());
|
|
$("#treeName").val(body.find('#treeName').val());
|