save
This commit is contained in:
parent
f6c80eb1ee
commit
a88e7f549f
@ -189,9 +189,9 @@ EOF;
|
|||||||
foreach ($props as $key => $item) {
|
foreach ($props as $key => $item) {
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
$options_string .= "\r\n $key: $item,";
|
$options_string .= "\n $key: $item,";
|
||||||
} else {
|
} else {
|
||||||
$options_string .= "\r\n $key: \"$item\",";
|
$options_string .= "\n $key: \"$item\",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,9 +261,9 @@ EOF;
|
|||||||
foreach ($props as $key => $item) {
|
foreach ($props as $key => $item) {
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
$options_string .= "\r\n $key: $item,";
|
$options_string .= "\n $key: $item,";
|
||||||
} else {
|
} else {
|
||||||
$options_string .= "\r\n $key: \"$item\",";
|
$options_string .= "\n $key: \"$item\",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ EOF;
|
|||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$options_string .= "\r\n $key: \"$item\",";
|
$options_string .= "\n $key: \"$item\",";
|
||||||
}
|
}
|
||||||
$id = $this->createId($field);
|
$id = $this->createId($field);
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ EOF;
|
|||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$options_string .= "\r\n $key: \"$item\",";
|
$options_string .= "\n $key: \"$item\",";
|
||||||
}
|
}
|
||||||
$id = $this->createId($field);
|
$id = $this->createId($field);
|
||||||
$id_start = "$id-date-start";
|
$id_start = "$id-date-start";
|
||||||
@ -453,9 +453,9 @@ EOF;
|
|||||||
foreach ($props as $key => $item) {
|
foreach ($props as $key => $item) {
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
$options_string .= "\r\n $key: $item,";
|
$options_string .= "\n $key: $item,";
|
||||||
} else {
|
} else {
|
||||||
$options_string .= "\r\n $key: \"$item\",";
|
$options_string .= "\n $key: \"$item\",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -611,11 +611,11 @@ EOF;
|
|||||||
foreach ($props as $key => $item) {
|
foreach ($props as $key => $item) {
|
||||||
if (is_array($item)) {
|
if (is_array($item)) {
|
||||||
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
$item = json_encode($item, JSON_UNESCAPED_UNICODE);
|
||||||
$options_string .= "\r\n".($url?' ':' ')."$key: $item,";
|
$options_string .= "\n".($url?' ':' ')."$key: $item,";
|
||||||
} else if (is_string($item)) {
|
} else if (is_string($item)) {
|
||||||
$options_string .= "\r\n".($url?' ':' ')."$key: \"$item\",";
|
$options_string .= "\n".($url?' ':' ')."$key: \"$item\",";
|
||||||
} else {
|
} else {
|
||||||
$options_string .= "\r\n".($url?' ':' ')."$key: ".var_export($item, true).",";
|
$options_string .= "\n".($url?' ':' ')."$key: ".var_export($item, true).",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -818,8 +818,8 @@ EOF;
|
|||||||
$props = Util::getControlProps($info['control'], $info['control_args']);
|
$props = Util::getControlProps($info['control'], $info['control_args']);
|
||||||
|
|
||||||
if (isset($props['url'])) {
|
if (isset($props['url'])) {
|
||||||
$api .= "apis.push([\"$field\", \"{$props['url']}\"]);\r\n";
|
$api .= "\napis.push([\"$field\", \"{$props['url']}\"]);";
|
||||||
$api_result .= "apiResults[\"$field\"] = [];\r\n";
|
$api_result .= "\napiResults[\"$field\"] = [];";
|
||||||
} else if (!empty($props['data'])) {
|
} else if (!empty($props['data'])) {
|
||||||
$options = [];
|
$options = [];
|
||||||
foreach ($props['data'] as $option) {
|
foreach ($props['data'] as $option) {
|
||||||
@ -827,7 +827,7 @@ EOF;
|
|||||||
$options[$option['value']] = $option['name'];
|
$options[$option['value']] = $option['name'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$api_result .= "apiResults[\"$field\"] = " . json_encode($options, JSON_UNESCAPED_UNICODE) . ";\r\n";
|
$api_result .= "\napiResults[\"$field\"] = " . json_encode($options, JSON_UNESCAPED_UNICODE) . ";";
|
||||||
}
|
}
|
||||||
|
|
||||||
$templet = <<<EOF
|
$templet = <<<EOF
|
||||||
@ -871,22 +871,18 @@ EOF;
|
|||||||
if (!$api && $api_result) {
|
if (!$api && $api_result) {
|
||||||
$codes = <<<EOF
|
$codes = <<<EOF
|
||||||
// 获取表格中下拉或树形组件数据
|
// 获取表格中下拉或树形组件数据
|
||||||
let apiResults = {};
|
let apiResults = {};$api_result
|
||||||
$api_result
|
|
||||||
EOF;
|
EOF;
|
||||||
} else if ($api && !$api_result) {
|
} else if ($api && !$api_result) {
|
||||||
$codes = <<<EOF
|
$codes = <<<EOF
|
||||||
// 获取表格中下拉或树形组件数据
|
// 获取表格中下拉或树形组件数据
|
||||||
let apis = [];
|
let apis = [];$api
|
||||||
$api
|
|
||||||
EOF;
|
EOF;
|
||||||
} else if ($api && $api_result) {
|
} else if ($api && $api_result) {
|
||||||
$codes = <<<EOF
|
$codes = <<<EOF
|
||||||
// 获取表格中下拉或树形组件数据
|
// 获取表格中下拉或树形组件数据
|
||||||
let apis = [];
|
let apis = [];$api
|
||||||
$api
|
let apiResults = {};$api_result
|
||||||
let apiResults = {};
|
|
||||||
$api_result
|
|
||||||
EOF;
|
EOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,7 +171,6 @@
|
|||||||
|
|
||||||
// 相关常量
|
// 相关常量
|
||||||
const PRIMARY_KEY = "id";
|
const PRIMARY_KEY = "id";
|
||||||
//const CONTROLLER = "plugin\\admin\\app\\controller\\UserController";
|
|
||||||
const SELECT_API = "/app/admin/user/select";
|
const SELECT_API = "/app/admin/user/select";
|
||||||
const UPDATE_API = "/app/admin/user/update";
|
const UPDATE_API = "/app/admin/user/update";
|
||||||
const DELETE_API = "/app/admin/user/delete";
|
const DELETE_API = "/app/admin/user/delete";
|
||||||
|
@ -262,6 +262,7 @@
|
|||||||
layui.$('input[name="status"]').val(this.checked ? 1 : 0);
|
layui.$('input[name="status"]').val(this.checked ? 1 : 0);
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user