修改
This commit is contained in:
parent
ef30c07f4a
commit
fcc2e04b85
@ -11,17 +11,6 @@ use think\Paginator;
|
|||||||
|
|
||||||
class DataDictionary extends CatchController
|
class DataDictionary extends CatchController
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @time 2019年12月13日
|
|
||||||
* @throws \Exception
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function index(): string
|
|
||||||
{
|
|
||||||
return $this->fetch();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @time 2019年12月13日
|
* @time 2019年12月13日
|
||||||
@ -64,18 +53,22 @@ class DataDictionary extends CatchController
|
|||||||
return CatchResponse::paginate(Paginator::make(!$searchMode ? $tables : $searchTables, $request->get('limit') ?? 10, $request->get('page') ?? 1, $searchMode ? count($searchTables) : count($tables), false, []));
|
return CatchResponse::paginate(Paginator::make(!$searchMode ? $tables : $searchTables, $request->get('limit') ?? 10, $request->get('page') ?? 1, $searchMode ? count($searchTables) : count($tables), false, []));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @time 2019年12月13日
|
* @time 2019年12月13日
|
||||||
* @param $table
|
* @param $table
|
||||||
* @throws \Exception
|
* @return \think\response\Json
|
||||||
* @return string
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function view($table): string
|
public function view($table): \think\response\Json
|
||||||
{
|
{
|
||||||
$this->table = Db::query('show full columns from ' . $table);
|
$fields = Db::query('show full columns from ' . $table);
|
||||||
|
|
||||||
return $this->fetch();
|
array_walk($fields, function (&$item){
|
||||||
|
$item = array_change_key_case($item);
|
||||||
|
});
|
||||||
|
|
||||||
|
return CatchResponse::success($fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
13
view/catch-admin/src/views/system/database/table.vue
Normal file
13
view/catch-admin/src/views/system/database/table.vue
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<template>
|
||||||
|
$END$
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'table'
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user