账单导出

This commit is contained in:
2026-10-30 10:51:09 +08:00
parent 42a3fa00d4
commit 7366d88baf
178 changed files with 1166 additions and 898 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Exports;
use App\Models\BillModel;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
/**
* 门店账单批量导出:同一门店的账单合并在一张工作表,不同门店拆分为多个工作表
*/
class BillBatchExport implements WithMultipleSheets
{
/**
* @param Collection<int, BillModel> $bills 导出账单(with store)
*/
public function __construct(private readonly Collection $bills)
{
}
/**
* @return array<int, BillExport>
*/
public function sheets(): array
{
$usedNames = [];
$sheets = [];
foreach ($this->bills->groupBy('store_id') as $storeBills) {
$store = $storeBills->first()->store;
$storeId = (int) $storeBills->first()->store_id;
$sheetTitle = SheetName::make($store->name ?? ('门店#' . $storeId), $storeId, $usedNames);
$sheets[] = new BillExport($storeBills->values(), 0, $sheetTitle);
}
return $sheets;
}
}
+59 -20
View File
@@ -11,16 +11,17 @@ use App\Services\WeightEstimator;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithStyles;
use Maatwebsite\Excel\Concerns\WithTitle;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Fill;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
/**
* 门店账单单独导出:账单内明细按商品合并(可按一级分类过滤),明细行展示商品一级分类,
* 表尾汇总商品金额/配送费/附加金额/售后金额/总金额
* 门店账单导出:单账单可直接下载;多账单在同一工作表依次展示(批量导出按门店分组),
* 账单内明细按商品合并(可按一级分类过滤),表尾汇总商品金额/配送费/附加金额/售后金额/总金额
*/
class BillExport implements FromCollection, WithStyles
class BillExport implements FromCollection, WithStyles, WithTitle
{
/** 数量列填充色(浅黄) */
private const string QUANTITY_FILL = 'FFFFF2CC';
@@ -45,21 +46,38 @@ class BillExport implements FromCollection, WithStyles
/** 列头所在行索引 */
private int $headerRow = 1;
/** @var array<int, int> 各账单列头所在行索引 */
private array $headerRows = [];
/** @var array<int, array{header: int, last: int}> 各账单表格区域 */
private array $tableRanges = [];
/** 数据末行索引 */
private int $lastRow = 1;
/** @var Collection<int, BillModel> */
private Collection $bills;
/**
* @param BillModel $bill 导出账单(with store)
* @param BillModel|Collection<int, BillModel> $bills 导出账单(with store);多账单须属于同一门店
* @param int $categoryId 一级分类ID(0=全部)
* @param string $sheetTitle 工作表名称
*/
public function __construct(
private readonly BillModel $bill,
BillModel|Collection $bills,
private readonly int $categoryId = 0,
private readonly string $sheetTitle = '门店账单',
) {
$this->bills = $bills instanceof BillModel ? collect([$bills]) : $bills->values();
}
public function title(): string
{
return $this->sheetTitle;
}
/**
* 导出行:标题/范围/列头/明细/合计全部手工构建(行位置不固定,不用 WithHeadings)
* 导出行:每张账单保留独立的标题/范围/列头/明细/合计,多账单之间空一行
*/
public function collection(): Collection
{
@@ -67,7 +85,27 @@ class BillExport implements FromCollection, WithStyles
return $this->rows;
}
$items = app(BillDetailService::class)->mergedItems($this->bill);
$rows = [];
$rowIndex = 0;
foreach ($this->bills as $index => $bill) {
if ($index > 0) {
$rows[] = [''];
$rowIndex++;
}
$this->appendBillRows($bill, $rows, $rowIndex);
}
return $this->rows = collect($rows);
}
/**
* 追加一张账单的完整表格
*
* @param array<int, array<int, mixed>> $rows
*/
private function appendBillRows(BillModel $bill, array &$rows, int &$rowIndex): void
{
$items = app(BillDetailService::class)->mergedItems($bill);
// 商品 => 一级分类解析(明细行「一级分类」列与分类过滤共用同一份结果)
[$categories, $rootIds] = $this->resolveRootCategories($items);
@@ -77,10 +115,6 @@ class BillExport implements FromCollection, WithStyles
[$items, $categoryName] = $this->filterByRootCategory($items, $categories, $rootIds);
}
$bill = $this->bill;
$rows = [];
$rowIndex = 0;
// 标题行
$rows[] = ['门店账单 ' . $bill->bill_no];
$this->specialRows[++$rowIndex] = 'title';
@@ -102,7 +136,11 @@ class BillExport implements FromCollection, WithStyles
// 列头(包规=包规+单位合并;单价=每件零售价+单价单位;一级分类=商品根分类名)
$rows[] = ['序号', '品名', '一级分类', '包规', '单价', '数量', '重量(斤)', '金额'];
$this->specialRows[++$rowIndex] = 'header';
$currentHeaderRow = $rowIndex;
$this->headerRows[] = $currentHeaderRow;
if (count($this->headerRows) === 1) {
$this->headerRow = $rowIndex;
}
// 明细行(账单内同商品已合并,单价为每件价折算的零售价)
$totalQuantity = 0;
@@ -159,8 +197,7 @@ class BillExport implements FromCollection, WithStyles
$this->mergeRows[] = $rowIndex;
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'H', 'value' => (float) $grandTotal];
$this->lastRow = $rowIndex;
return $this->rows = collect($rows);
$this->tableRanges[] = ['header' => $currentHeaderRow, 'last' => $rowIndex];
}
/**
@@ -194,20 +231,22 @@ class BillExport implements FromCollection, WithStyles
$sheet->getStyle('A' . $row)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT);
}
// 表格区域(列头 → 末行)添加所有边框
$sheet->getStyle('A' . $this->headerRow . ':H' . $this->lastRow)
// 各账单表格区域(列头 → 末行)添加所有边框,金额列设置货币格式
foreach ($this->tableRanges as $range) {
$sheet->getStyle('A' . $range['header'] . ':H' . $range['last'])
->getBorders()
->getAllBorders()
->setBorderStyle(Border::BORDER_THIN);
// 金额列货币格式:¥ + 两位小数(单价列为文本,不设格式)
$sheet->getStyle('H' . ($this->headerRow + 1) . ':H' . $this->lastRow)
$sheet->getStyle('H' . ($range['header'] + 1) . ':H' . $range['last'])
->getNumberFormat()
->setFormatCode(self::CURRENCY_FORMAT);
}
// 列头固定填色:数量列(F)浅黄、金额列(H)浅红
$this->fillCell($sheet, 'F' . $this->headerRow, self::QUANTITY_FILL);
$this->fillCell($sheet, 'H' . $this->headerRow, self::AMOUNT_FILL);
foreach ($this->headerRows as $headerRow) {
$this->fillCell($sheet, 'F' . $headerRow, self::QUANTITY_FILL);
$this->fillCell($sheet, 'H' . $headerRow, self::AMOUNT_FILL);
}
// 数据区条件填色:非 0 填色,0 无背景(金额含负值)
foreach ($this->fillCells as $cell) {
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Mini;
use App\Exceptions\RepositoryException;
use App\Exports\BillBatchExport;
use App\Exports\BillExport;
use App\Models\BillModel;
use App\Services\BillDetailService;
@@ -86,6 +87,37 @@ class BillController extends BaseMiniController
return $this->success($data);
}
/**
* 批量导出账单:仅可导出本店账单,选中账单合并在同一工作表
*/
#[GetRoute('/bill/batch-export', authorize: true)]
public function batchExport(Request $request): Response
{
$data = $request->validate([
'ids' => 'required|array|min:1|max:100',
'ids.*' => 'required|integer|distinct',
], [
'ids.required' => '请选择要导出的账单',
'ids.max' => '单次最多导出 100 张账单',
'ids.*.distinct' => '账单不能重复选择',
]);
$store = $this->currentStore($request);
$bills = BillModel::query()
->with('store:id,name')
->where('store_id', $store->id)
->whereIn('id', $data['ids'])
->orderBy('bill_date')
->orderBy('id')
->get();
if ($bills->count() !== count($data['ids'])) {
throw new RepositoryException('包含不存在或不属于当前门店的账单');
}
return Excel::download(new BillBatchExport($bills), '门店账单_批量导出.xlsx');
}
/**
* 单独导出账单:仅可导出本店账单(强制 store_id 过滤);
* ?category_id= 一级分类过滤(0/缺省=全部)
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Recon;
use App\Exceptions\RepositoryException;
use App\Exports\BillBatchExport;
use App\Exports\BillExport;
use App\Models\BillModel;
use App\Models\StoreModel;
@@ -60,6 +61,27 @@ class BillController extends BaseController
return $this->success($data);
}
/**
* 批量导出账单:同一门店的账单合并在一张工作表,不同门店拆分为多个工作表
*/
#[GetRoute(route: '/batch-export', authorize: 'export')]
public function batchExport(Request $request): Response
{
$data = $request->validate([
'ids' => 'required|array|min:1|max:100',
'ids.*' => 'required|integer|distinct|exists:bill,id',
]);
$bills = BillModel::query()
->with('store:id,name')
->whereIn('id', $data['ids'])
->orderBy('bill_date')
->orderBy('id')
->get();
return Excel::download(new BillBatchExport($bills), '门店账单_批量导出.xlsx');
}
/**
* 单独导出账单:账单内明细按商品合并(可按一级分类过滤),
* 表尾汇总商品金额/配送费/附加金额/售后金额/总金额
+2
View File
@@ -0,0 +1,2 @@
allowBuilds:
es5-ext: set this to true or false
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{t as r}from"./user-BIny2SBS.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t};
-1
View File
@@ -1 +0,0 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{t as r}from"./user-2bb2WM5y.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import{o as e}from"./request-DWqS4XYU.js";import{Ct as t,Hn as n,Pr as r,Q as i,Wn as a,Z as o,at as s,mr as c,p as ee,u as te,wt as l,yt as u}from"./jsx-runtime-Dk2XcqH2.js";import{f as d,m as f,p}from"./tooltip-Up9y7xD6.js";import{a as m,o as h}from"./style-DRVsp3wL.js";import{r as g,t as _}from"./es-Hs1QDgUQ.js";var v=e(r());function y(e,t){let n=(0,v.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,v.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ne(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var b=(0,v.forwardRef)((e,r)=>{let{prefixCls:b,bordered:re=!0,status:ie,size:ae,disabled:oe,onBlur:se,onFocus:ce,suffix:x,allowClear:S,addonAfter:C,addonBefore:w,className:T,style:E,styles:D,rootClassName:O,onChange:k,classNames:A,variant:j,...M}=e,{getPrefixCls:N,direction:P,allowClear:F,autoComplete:I,className:L,style:R,classNames:z,styles:B}=n(`input`),V=N(`input`,b),H=(0,v.useRef)(null),U=u(V),[W,le]=h(V,O);m(V,U);let{compactSize:ue,compactItemClassnames:de}=o(V,P),G=i(e=>ae??ue??e),fe=v.useContext(s),K=oe??fe,pe={...e,size:G,disabled:K},me=l(R),he=l(E),[q,J]=t([z,A],[B,me,D,he],{props:pe}),{status:ge,hasFeedback:Y,feedbackIcon:_e}=(0,v.useContext)(ee),X=d(ge,ie),ve=ne(e)||!!Y;(0,v.useRef)(ve);let Z=y(H,!0),ye=e=>{Z(),se?.(e)},be=e=>{Z(),ce?.(e)},xe=e=>{Z(),k?.(e)},Se=(Y||x)&&v.createElement(v.Fragment,null,x,Y&&_e),Ce=g({allowClear:S,contextAllowClear:F,componentName:`Input`}),[Q,$]=te(`input`,j,re);return v.createElement(_,{ref:c(r,H),prefixCls:V,autoComplete:I,...M,disabled:K,onBlur:ye,onFocus:be,style:J.root,styles:J,suffix:Se,allowClear:Ce,className:a(T,O,le,U,de,L,q.root),onChange:xe,addonBefore:w&&v.createElement(f,{form:!0,space:!0},w),addonAfter:C&&v.createElement(f,{form:!0,space:!0},C),classNames:{...q,input:a({[`${V}-sm`]:G===`small`,[`${V}-lg`]:G===`large`,[`${V}-rtl`]:P===`rtl`},q.input,W),variant:a({[`${V}-${Q}`]:$},p(V,X)),affixWrapper:a({[`${V}-affix-wrapper-sm`]:G===`small`,[`${V}-affix-wrapper-lg`]:G===`large`,[`${V}-affix-wrapper-rtl`]:P===`rtl`},W),wrapper:a({[`${V}-group-rtl`]:P===`rtl`},W),groupWrapper:a({[`${V}-group-wrapper-sm`]:G===`small`,[`${V}-group-wrapper-lg`]:G===`large`,[`${V}-group-wrapper-rtl`]:P===`rtl`,[`${V}-group-wrapper-${Q}`]:$},p(`${V}-group-wrapper`,X,Y),W)}})});export{y as n,b as t};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Ct as t,Hn as n,Pr as r,Q as ee,Wn as i,Z as a,at as o,mr as s,p as te,u as c,wt as l,yt as ne}from"./jsx-runtime-OfKoVykY.js";import{f as re,m as u,p as d}from"./tooltip-DI_m69zk.js";import{a as f,o as p}from"./style-CSZsuTOx.js";import{r as m,t as h}from"./es-CSpN2d0Y.js";import{a as g}from"./useBreakpoint-DER0GTnn.js";var _=e(r()),v=e=>{let t=_.useRef(e),[,n]=g();return[()=>t.current,e=>{t.current=e,n()}]};function y(e,t){let n=(0,_.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,_.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ie(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var b=(0,_.forwardRef)((e,r)=>{let{prefixCls:g,bordered:v=!0,status:b,size:ae,disabled:oe,onBlur:se,onFocus:ce,suffix:x,allowClear:le,addonAfter:S,addonBefore:C,className:w,style:T,styles:E,rootClassName:D,onChange:O,classNames:k,variant:A,...j}=e,{getPrefixCls:M,direction:N,allowClear:P,autoComplete:F,className:I,style:L,classNames:R,styles:z}=n(`input`),B=M(`input`,g),V=(0,_.useRef)(null),H=ne(B),[U,W]=p(B,D);f(B,H);let{compactSize:ue,compactItemClassnames:de}=a(B,N),G=ee(e=>ae??ue??e),fe=_.useContext(o),K=oe??fe,pe={...e,size:G,disabled:K},me=l(L),he=l(T),[q,J]=t([R,k],[z,me,E,he],{props:pe}),{status:ge,hasFeedback:Y,feedbackIcon:_e}=(0,_.useContext)(te),X=re(ge,b),ve=ie(e)||!!Y;(0,_.useRef)(ve);let Z=y(V,!0),ye=e=>{Z(),se?.(e)},be=e=>{Z(),ce?.(e)},xe=e=>{Z(),O?.(e)},Se=(Y||x)&&_.createElement(_.Fragment,null,x,Y&&_e),Ce=m({allowClear:le,contextAllowClear:P,componentName:`Input`}),[Q,$]=c(`input`,A,v);return _.createElement(h,{ref:s(r,V),prefixCls:B,autoComplete:F,...j,disabled:K,onBlur:ye,onFocus:be,style:J.root,styles:J,suffix:Se,allowClear:Ce,className:i(w,D,W,H,de,I,q.root),onChange:xe,addonBefore:C&&_.createElement(u,{form:!0,space:!0},C),addonAfter:S&&_.createElement(u,{form:!0,space:!0},S),classNames:{...q,input:i({[`${B}-sm`]:G===`small`,[`${B}-lg`]:G===`large`,[`${B}-rtl`]:N===`rtl`},q.input,U),variant:i({[`${B}-${Q}`]:$},d(B,X)),affixWrapper:i({[`${B}-affix-wrapper-sm`]:G===`small`,[`${B}-affix-wrapper-lg`]:G===`large`,[`${B}-affix-wrapper-rtl`]:N===`rtl`},U),wrapper:i({[`${B}-group-rtl`]:N===`rtl`},U),groupWrapper:i({[`${B}-group-wrapper-sm`]:G===`small`,[`${B}-group-wrapper-lg`]:G===`large`,[`${B}-group-wrapper-rtl`]:N===`rtl`,[`${B}-group-wrapper-${Q}`]:$},d(`${B}-group-wrapper`,X,Y),U)}})});export{y as n,v as r,b as t};
@@ -1,4 +1,4 @@
import{o as e}from"./request-DWqS4XYU.js";import{J as t,Nn as n,Pr as r,Rt as i}from"./jsx-runtime-Dk2XcqH2.js";var a=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),o=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),s=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),c=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),l=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),u=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),d={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:a,outKeyframes:o},"move-left":{inKeyframes:s,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:u}},f=(e,n)=>{let{antCls:r}=e,i=`${r}-${n}`,{inKeyframes:a,outKeyframes:o}=d[n];return[t(i,a,o,e.motionDurationMid),{[`
import{o as e}from"./request-xrnk7ZJV.js";import{J as t,Nn as n,Pr as r,Rt as i}from"./jsx-runtime-OfKoVykY.js";var a=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),o=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),s=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),c=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),l=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),u=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),d={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:a,outKeyframes:o},"move-left":{inKeyframes:s,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:u}},f=(e,n)=>{let{antCls:r}=e,i=`${r}-${n}`,{inKeyframes:a,outKeyframes:o}=d[n];return[t(i,a,o,e.motionDurationMid),{[`
${i}-enter,
${i}-appear
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},p=e(r()),m={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}var g=p.forwardRef((e,t)=>p.createElement(i,h({},e,{ref:t,icon:m})));export{f as n,g as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Bn as t,Er as n,Pr as r}from"./jsx-runtime-Dk2XcqH2.js";import{t as i}from"./config-provider-C5VHLPRf.js";var a=e(r());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,r,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=n(!1,o.open),{getPrefixCls:v}=a.useContext(t),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),r&&(b={...b,[r]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Bn as t,Er as n,Pr as r}from"./jsx-runtime-OfKoVykY.js";import{t as i}from"./config-provider-DDrois2A.js";var a=e(r());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,r,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=n(!1,o.open),{getPrefixCls:v}=a.useContext(t),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),r&&(b={...b,[r]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./request-DWqS4XYU.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t};
import{t as e}from"./request-xrnk7ZJV.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{o as r}from"./chunk-OB3PAWPO-6cTVLEZE.js";import{t as i}from"./typography-DvDsdb2f.js";import{t as a}from"./tooltip-Up9y7xD6.js";import{t as o}from"./space-DZlFkFGY.js";import{t as s}from"./button-CdrnzceP.js";import{t as c}from"./card-CAlqEh_K.js";import{t as l}from"./spin-BQRqgLXi.js";import{t as u}from"./tag-Dh4xJ3v_.js";import{t as d}from"./useTranslation-BktiQivz.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-kOY0oRfZ.js";import{n as _,r as v}from"./agent-VZOA_xNn.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{o as r}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as i}from"./typography-C81dpVAv.js";import{t as a}from"./tooltip-DI_m69zk.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./card-C-jMUkpS.js";import{t as l}from"./spin-CELNGCax.js";import{t as u}from"./tag-CY8tAhzO.js";import{t as d}from"./useTranslation-C4ZVtLa2.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-DMEx4_h0.js";import{n as _,r as v}from"./agent-CGxkD5Jw.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./typography-DvDsdb2f.js";import{t as r}from"./image-Dk7hCtCg.js";import{t as i}from"./tag-Dh4xJ3v_.js";import{t as a}from"./XinTable-Ckq4e_EB.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./typography-C81dpVAv.js";import{t as r}from"./image-De67jw-e.js";import{t as i}from"./tag-CY8tAhzO.js";import{t as a}from"./XinTable-C5M2dV7B.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{t as r}from"./typography-DvDsdb2f.js";import{t as i}from"./button-CdrnzceP.js";import{l as a}from"./XinForm-BVjxA6JJ.js";import{t as o}from"./form-DhDb91Ug.js";import{t as s}from"./tag-Dh4xJ3v_.js";import{k as c}from"./index-kOY0oRfZ.js";import{t as l}from"./XinTable-Ckq4e_EB.js";import{n as u,t as d}from"./category-Bv-Vkz0i.js";var f=e(t(),1),p={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},m=n(),{Title:h,Text:g}=r,_=({form:e,tree:t,value:n,onChange:r})=>{let i=o.useWatch(`id`,e),s=o.useWatch(`children`,e),c=Array.isArray(s)&&s.length>0,l=(0,f.useMemo)(()=>{let e=(t,n)=>t.map(t=>({...t,disabled:n>=2||t.id===i||c&&n>=1,children:t.children?.length?e(t.children,n+1):t.children}));return[{id:0,name:`顶级分类`,children:e(t,1)}]},[t,i,c]);return(0,m.jsx)(a,{value:n,onChange:r,treeData:l,fieldNames:{label:`name`,value:`id`,children:`children`},placeholder:`默认顶级分类`,treeDefaultExpandAll:!0})};function v(e){let t=[],n=e=>{e.forEach(e=>{e.id!==void 0&&t.push(e.id),e.children?.length&&n(e.children)})};return n(e),t}var y=()=>{let[e,t]=(0,f.useState)([]),[n,r]=(0,f.useState)([]),[a,o]=(0,f.useState)([]);return(0,f.useEffect)(()=>{u().then(e=>o(e.data.data??[]))},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`mb-5`,children:[(0,m.jsx)(h,{level:3,children:`商品分类`}),(0,m.jsx)(g,{type:`secondary`,children:`多级分类(如蔬菜/水果/其他),采购单导出与对账筛选按分类归组;有子分类或挂载商品时不可删除。`})]}),(0,m.jsx)(l,{api:`/product/category`,columns:[{title:`分类名称`,dataIndex:`name`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入分类名称`}]},{title:`上级分类`,dataIndex:`parent_id`,hideInTable:!0,hideInSearch:!0,initialValue:0,fieldRender:e=>(0,m.jsx)(_,{form:e,tree:a})},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0},align:`center`},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,hideInSearch:!0,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=p[t.status??1];return(0,m.jsx)(s,{color:n?.color,children:n?.text})},align:`center`},{title:`创建时间`,dataIndex:`updated_at`,hideInForm:!0,hideInSearch:!0,align:`center`},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`product.category`,handleRequest:async()=>{let e=(await d()).data.data??[];return r(v(e)),{data:e,total:e.length}},pagination:{pageSize:200},expandable:{expandedRowKeys:e,onExpandedRowsChange:e=>t([...e])},actionBarRender:r=>[r.add,(0,m.jsx)(i,{icon:(0,m.jsx)(c,{}),onClick:()=>t(e.length?[]:n),children:e.length?`全部收起`:`全部展开`}),r.keywordSearch],formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:20},layout:`vertical`},modalProps:{width:640}})]})};export{y as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{t as r}from"./typography-C81dpVAv.js";import{t as i}from"./button-DsOd0cni.js";import{l as a}from"./XinForm-D9piiVGF.js";import{t as o}from"./form-CDfHsmlW.js";import{t as s}from"./tag-CY8tAhzO.js";import{k as c}from"./index-DMEx4_h0.js";import{t as l}from"./XinTable-C5M2dV7B.js";import{n as u,t as d}from"./category-D44XYgt2.js";var f=e(t(),1),p={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},m=n(),{Title:h,Text:g}=r,_=({form:e,tree:t,value:n,onChange:r})=>{let i=o.useWatch(`id`,e),s=o.useWatch(`children`,e),c=Array.isArray(s)&&s.length>0,l=(0,f.useMemo)(()=>{let e=(t,n)=>t.map(t=>({...t,disabled:n>=2||t.id===i||c&&n>=1,children:t.children?.length?e(t.children,n+1):t.children}));return[{id:0,name:`顶级分类`,children:e(t,1)}]},[t,i,c]);return(0,m.jsx)(a,{value:n,onChange:r,treeData:l,fieldNames:{label:`name`,value:`id`,children:`children`},placeholder:`默认顶级分类`,treeDefaultExpandAll:!0})};function v(e){let t=[],n=e=>{e.forEach(e=>{e.id!==void 0&&t.push(e.id),e.children?.length&&n(e.children)})};return n(e),t}var y=()=>{let[e,t]=(0,f.useState)([]),[n,r]=(0,f.useState)([]),[a,o]=(0,f.useState)([]);return(0,f.useEffect)(()=>{u().then(e=>o(e.data.data??[]))},[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`mb-5`,children:[(0,m.jsx)(h,{level:3,children:`商品分类`}),(0,m.jsx)(g,{type:`secondary`,children:`多级分类(如蔬菜/水果/其他),采购单导出与对账筛选按分类归组;有子分类或挂载商品时不可删除。`})]}),(0,m.jsx)(l,{api:`/product/category`,columns:[{title:`分类名称`,dataIndex:`name`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入分类名称`}]},{title:`上级分类`,dataIndex:`parent_id`,hideInTable:!0,hideInSearch:!0,initialValue:0,fieldRender:e=>(0,m.jsx)(_,{form:e,tree:a})},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0},align:`center`},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,hideInSearch:!0,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=p[t.status??1];return(0,m.jsx)(s,{color:n?.color,children:n?.text})},align:`center`},{title:`创建时间`,dataIndex:`updated_at`,hideInForm:!0,hideInSearch:!0,align:`center`},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`product.category`,handleRequest:async()=>{let e=(await d()).data.data??[];return r(v(e)),{data:e,total:e.length}},pagination:{pageSize:200},expandable:{expandedRowKeys:e,onExpandedRowsChange:e=>t([...e])},actionBarRender:r=>[r.add,(0,m.jsx)(i,{icon:(0,m.jsx)(c,{}),onClick:()=>t(e.length?[]:n),children:e.length?`全部收起`:`全部展开`}),r.keywordSearch],formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:20},layout:`vertical`},modalProps:{width:640}})]})};export{y as default};
@@ -1 +1 @@
import{t as e}from"./request-DWqS4XYU.js";async function t(){return e({url:`/product/category/tree`,method:`get`})}async function n(){return e({url:`/product/category`,method:`get`})}export{t as n,n as t};
import{t as e}from"./request-xrnk7ZJV.js";async function t(){return e({url:`/product/category/tree`,method:`get`})}async function n(){return e({url:`/product/category`,method:`get`})}export{t as n,n as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
import{o as e}from"./request-DWqS4XYU.js";import{$n as t,Bn as n,Ct as r,Er as i,Hn as a,Ln as o,Ot as s,Pr as c,Un as l,Wn as u,Xt as d,at as f,en as p,jr as m,jt as h,nr as g,p as _,qt as v,rr as y,wn as b,wt as x,yr as S,yt as C}from"./jsx-runtime-Dk2XcqH2.js";import{a as w,i as T}from"./ColorPresets-BZbQ_VEs.js";import{i as E,r as D}from"./button-CdrnzceP.js";import{n as O,t as k}from"./useBubbleLock-TNrx0Zlu.js";var A=e(c()),j=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`,a=`@media (hover: hover) and (pointer: fine)`;return[{[`${t}-group`]:{...p(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...p(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0}},[t]:{...p(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${o(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...E(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${o(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...D()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:d(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[a]:{[`
import{o as e}from"./request-xrnk7ZJV.js";import{$n as t,Bn as n,Ct as r,Er as i,Hn as a,Ln as o,Ot as s,Pr as c,Un as l,Wn as u,Xt as d,at as f,en as p,jr as m,jt as h,nr as g,p as _,qt as v,rr as y,wn as b,wt as x,yr as S,yt as C}from"./jsx-runtime-OfKoVykY.js";import{a as w,i as T}from"./ColorPresets-BWkFn7Wc.js";import{i as E,r as D}from"./button-DsOd0cni.js";import{n as O,t as k}from"./useBubbleLock-CbjUhioC.js";var A=e(c()),j=e=>{let{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,i=`${t}-wrapper`,a=`@media (hover: hover) and (pointer: fine)`;return[{[`${t}-group`]:{...p(e),display:`inline-flex`,flexWrap:`wrap`,columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...p(e),display:`inline-flex`,alignItems:`baseline`,cursor:`pointer`,"&:after":{display:`inline-block`,width:0,overflow:`hidden`,content:`'\\a0'`},[`& + ${i}`]:{marginInlineStart:0}},[t]:{...p(e),position:`relative`,whiteSpace:`nowrap`,lineHeight:1,cursor:`pointer`,alignSelf:`center`,boxSizing:`border-box`,display:`block`,width:n,height:n,direction:`ltr`,backgroundColor:e.colorBgContainer,border:`${o(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:`separate`,transition:`all ${e.motionDurationSlow}`,flex:`none`,...E(),"&:after":{boxSizing:`border-box`,position:`absolute`,top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:`table`,width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${o(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:`rotate(45deg) scale(0) translate(-50%,-50%)`,opacity:0,content:`""`,transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`,...D()},[`${t}-input`]:{position:`absolute`,inset:`calc(-1 * (${r}))`,zIndex:1,cursor:`pointer`,opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:d(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[a]:{[`
${i}:not(${i}-disabled),
${t}:not(${t}-disabled)
`]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...D()},[a]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},[a]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function M(e,t){return j(b(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var N=v(`Checkbox`,(e,{prefixCls:t})=>[M(t,e)]),P=A.createContext(null),F=A.forwardRef((e,t)=>{let{prefixCls:n,children:o,indeterminate:s=!1,onMouseEnter:c,onMouseLeave:l,skipGroup:d=!1,disabled:p,rootClassName:h,className:g,style:v,classNames:b,styles:E,name:D,value:j,checked:M,defaultChecked:F,onChange:I,...L}=e,{getPrefixCls:R,direction:z,className:B,style:V,classNames:H,styles:U}=a(`checkbox`),W=A.useContext(P),{isFormItemInput:ee}=A.useContext(_),te=A.useContext(f),G=p??W?.disabled??te,[ne,re]=i(F,M),K=ne,ie=m(e=>{re(e.target.checked),I?.(e),!d&&W?.toggleOption&&W.toggleOption({label:o,value:j})});W&&!d&&(K=W.value.includes(j));let q=A.useRef(null),ae=S(t,q);A.useEffect(()=>{if(!d&&W)return W.registerValue(j),()=>{W.cancelValue(j)}},[j,d]),A.useEffect(()=>{q.current?.input&&(q.current.input.indeterminate=s)},[s]);let J=R(`checkbox`,n),Y=C(J),[X,oe]=N(J,Y),Z={...L},se={...e,indeterminate:s,disabled:G,checked:K},ce=x(V),le=x(v),[Q,$]=r([H,b],[U,ce,E,le],{props:se}),ue=u(`${J}-wrapper`,{[`${J}-rtl`]:z===`rtl`,[`${J}-wrapper-checked`]:K,[`${J}-wrapper-disabled`]:G,[`${J}-wrapper-in-form-item`]:ee},B,g,Q.root,h,oe,Y,X),de=u(Q.icon,{[`${J}-indeterminate`]:s},w,X),[fe,pe]=k(Z.onClick);return A.createElement(T,{component:`Checkbox`,disabled:G},A.createElement(`label`,{className:ue,style:$.root,onMouseEnter:c,onMouseLeave:l,onClick:fe},A.createElement(O,{...Z,name:!d&&W?W.name:D,checked:K,onClick:pe,onChange:ie,prefixCls:J,className:de,style:$.icon,disabled:G,ref:ae,value:j}),y(o)&&A.createElement(`span`,{className:u(`${J}-label`,Q.label),style:$.label},o)))}),I=A.forwardRef((e,r)=>{let{defaultValue:a,children:o,options:c=[],prefixCls:d,className:f,rootClassName:p,style:m,onChange:_,role:v=`group`,...y}=e,{getPrefixCls:b,direction:x}=A.useContext(n),[S,w]=i(a||[],y.value),T=S||[],[E,D]=A.useState([]),O=A.useMemo(()=>c.map(e=>h(e)||s(e)?{label:e,value:e}:e).filter(e=>g(e)&&g(e.value)),[c]),k=e=>{D(t=>t.filter(t=>t!==e))},j=e=>{D(t=>[].concat(l(t),[e]))},M=e=>{let t=T.indexOf(e.value),n=l(T);t===-1?n.push(e.value):n.splice(t,1),w(n),_?.(n.filter(e=>E.includes(e)).sort((e,t)=>O.findIndex(t=>t.value===e)-O.findIndex(e=>e.value===t)))},I=b(`checkbox`,d),L=`${I}-group`,R=C(I),[z,B]=N(I,R),V=t(y,[`value`,`disabled`]),H=Array.isArray(O)&&O.length>0?O.map(e=>A.createElement(F,{prefixCls:I,key:e.value.toString(),disabled:`disabled`in e?e.disabled:y.disabled,value:e.value,checked:T.includes(e.value),onChange:e.onChange,className:u(`${L}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,U=A.useMemo(()=>({toggleOption:M,value:T,disabled:y.disabled,name:y.name,registerValue:j,cancelValue:k}),[M,T,y.disabled,y.name,j,k]),W=u(L,{[`${L}-rtl`]:x===`rtl`},f,p,B,R,z);return A.createElement(`div`,{className:W,style:m,role:v,...V,ref:r},A.createElement(P.Provider,{value:U},H))}),L=F;L.Group=I,L.__ANT_CHECKBOX=!0;export{M as n,L as t};
`]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`,...D()},[a]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`},[a]:{[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}}},{[`${i}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function M(e,t){return j(b(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var N=v(`Checkbox`,(e,{prefixCls:t})=>[M(t,e)]),P=A.createContext(null),F=A.forwardRef((e,t)=>{let{prefixCls:n,children:o,indeterminate:s=!1,onMouseEnter:c,onMouseLeave:l,skipGroup:d=!1,disabled:p,rootClassName:h,className:g,style:v,classNames:b,styles:E,name:D,value:j,checked:M,defaultChecked:F,onChange:I,...L}=e,{getPrefixCls:R,direction:z,className:B,style:V,classNames:H,styles:U}=a(`checkbox`),W=A.useContext(P),{isFormItemInput:ee}=A.useContext(_),te=A.useContext(f),G=p??W?.disabled??te,[ne,re]=i(F,M),K=ne,ie=m(e=>{re(e.target.checked),I?.(e),!d&&W?.toggleOption&&W.toggleOption({label:o,value:j})});W&&!d&&(K=W.value.includes(j));let q=A.useRef(null),ae=S(t,q);A.useEffect(()=>{if(!d&&W)return W.registerValue(j),()=>{W.cancelValue(j)}},[j,d]),A.useEffect(()=>{q.current?.input&&(q.current.input.indeterminate=s)},[s]);let J=R(`checkbox`,n),Y=C(J),[X,oe]=N(J,Y),Z={...L},se={...e,indeterminate:s,disabled:G,checked:K},ce=x(V),le=x(v),[Q,$]=r([H,b],[U,ce,E,le],{props:se}),ue=u(`${J}-wrapper`,{[`${J}-rtl`]:z===`rtl`,[`${J}-wrapper-checked`]:K,[`${J}-wrapper-disabled`]:G,[`${J}-wrapper-in-form-item`]:ee},B,g,Q.root,h,oe,Y,X),de=u(Q.icon,{[`${J}-indeterminate`]:s},w,X),[fe,pe]=k(Z.onClick);return A.createElement(T,{component:`Checkbox`,disabled:G},A.createElement(`label`,{className:ue,style:$.root,onMouseEnter:c,onMouseLeave:l,onClick:fe},A.createElement(O,{...Z,name:!d&&W?W.name:D,checked:K,onClick:pe,onChange:ie,prefixCls:J,className:de,style:$.icon,disabled:G,ref:ae,value:j}),y(o)&&A.createElement(`span`,{className:u(`${J}-label`,Q.label),style:$.label},o)))}),I=A.forwardRef((e,r)=>{let{defaultValue:a,children:o,options:c=[],prefixCls:d,className:f,rootClassName:p,style:m,onChange:_,role:v=`group`,...y}=e,{getPrefixCls:b,direction:x}=A.useContext(n),[S,w]=i(a||[],y.value),T=S||[],[E,D]=A.useState([]),O=A.useMemo(()=>c.map(e=>h(e)||s(e)?{label:e,value:e}:e).filter(e=>g(e)&&g(e.value)),[c]),k=e=>{D(t=>t.filter(t=>t!==e))},j=e=>{D(t=>[].concat(l(t),[e]))},M=e=>{let t=T.indexOf(e.value),n=l(T);t===-1?n.push(e.value):n.splice(t,1),w(n),_?.(n.filter(e=>E.includes(e)).sort((e,t)=>O.findIndex(t=>t.value===e)-O.findIndex(e=>e.value===t)))},I=b(`checkbox`,d),L=`${I}-group`,R=C(I),[z,B]=N(I,R),V=t(y,[`value`,`disabled`]),H=O.length>0?O.map(e=>A.createElement(F,{prefixCls:I,key:e.value.toString(),disabled:`disabled`in e?e.disabled:y.disabled,value:e.value,checked:T.includes(e.value),onChange:e.onChange,className:u(`${L}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):o,U=A.useMemo(()=>({toggleOption:M,value:T,disabled:y.disabled,name:y.name,registerValue:j,cancelValue:k}),[M,T,y.disabled,y.name,j,k]),W=u(L,{[`${L}-rtl`]:x===`rtl`},f,p,B,R,z);return A.createElement(`div`,{className:W,style:m,role:v,...V,ref:r},A.createElement(P.Provider,{value:U},H))}),L=F;L.Group=I,L.__ANT_CHECKBOX=!0;export{M as n,L as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e,t}from"./request-DWqS4XYU.js";import{Pr as n,t as r}from"./jsx-runtime-Dk2XcqH2.js";import{t as i}from"./typography-DvDsdb2f.js";import{t as a}from"./tooltip-Up9y7xD6.js";import{t as o}from"./table-koANj7dJ.js";import{t as s}from"./button-CdrnzceP.js";import{n as c}from"./LockOutlined-CXWTaKH6.js";import{t as l}from"./EyeOutlined-BK7I_5TI.js";import{t as u}from"./tag-Dh4xJ3v_.js";import{t as d}from"./useTranslation-BktiQivz.js";import{Pt as f}from"./index-kOY0oRfZ.js";import{t as p}from"./XinTable-Ckq4e_EB.js";async function m(e,n){return t({url:`/ai/conversation/${e}/messages`,method:`get`,params:n})}var h=e(c(),1),g=e(n(),1),_=r(),{Title:v,Text:y}=i;function b(){let{t:e}=d(),[t,n]=(0,g.useState)(!1),[r,i]=(0,g.useState)(``),[c,b]=(0,g.useState)([]),[x,S]=(0,g.useState)(!1),[C,w]=(0,g.useState)(0),[T,E]=(0,g.useState)(1),[D,O]=(0,g.useState)(``),k=async(e,t)=>{S(!0);try{let n=(await m(e,{page:t,pageSize:20})).data.data;b(n.data),w(n.total)}finally{S(!1)}},A=async e=>{O(e.id),i(e.title||``),E(1),n(!0),await k(e.id,1)},j=e=>{E(e),k(D,e)},M=[{title:e(`ai.conversation.id`),dataIndex:`id`,hideInForm:!0,width:260,ellipsis:!0,align:`center`},{title:e(`ai.conversation.username`),dataIndex:`username`,hideInForm:!0,align:`center`,width:120,render:t=>t||e(`ai.conversation.noUser`)},{title:e(`ai.conversation.title`),dataIndex:`title`,valueType:`text`,ellipsis:!0},{title:e(`ai.conversation.messageCount`),dataIndex:`message_count`,hideInForm:!0,hideInSearch:!0,align:`center`,width:100},{title:e(`ai.conversation.createdAt`),dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`},{title:e(`ai.conversation.updatedAt`),dataIndex:`updated_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}],N=[{title:e(`ai.conversation.message.role`),dataIndex:`role`,width:100,render:t=>(0,_.jsx)(u,{color:{user:`blue`,assistant:`green`,system:`orange`}[t]||`default`,children:e(`ai.conversation.message.role.${t}`,t)})},{title:e(`ai.conversation.message.agent`),dataIndex:`agent`,width:150,ellipsis:!0},{title:e(`ai.conversation.message.content`),dataIndex:`content`,ellipsis:!0},{title:e(`ai.conversation.message.createdAt`),dataIndex:`created_at`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}];return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`mb-5`,children:[(0,_.jsx)(v,{level:3,children:e(`ai.conversation.page.title`)}),(0,_.jsx)(y,{type:`secondary`,children:e(`ai.conversation.page.description`)})]}),(0,_.jsx)(p,{api:`/ai/conversation`,columns:M,rowKey:`id`,accessName:`ai.conversation`,addShow:!1,editShow:!1,formProps:!1,operateProps:{fixed:`right`,width:120},operateRender:(t,n)=>[(0,_.jsx)(a,{title:e(`ai.conversation.viewMessages`),children:(0,_.jsx)(s,{type:`primary`,icon:(0,_.jsx)(l,{}),size:`small`,onClick:()=>A(t)})},`view`),n.del],scroll:{x:1100},cardProps:{variant:`borderless`}}),(0,_.jsx)(f,{title:`${e(`ai.conversation.messageTitle`)} - ${r}`,open:t,onClose:()=>n(!1),width:900,children:(0,_.jsx)(o,{dataSource:c,columns:N,rowKey:`id`,loading:x,pagination:{current:T,total:C,pageSize:20,onChange:j,showSizeChanger:!1},scroll:{x:700},size:`small`})})]})}export{b as default};
import{o as e,t}from"./request-xrnk7ZJV.js";import{Pr as n,t as r}from"./jsx-runtime-OfKoVykY.js";import{t as i}from"./typography-C81dpVAv.js";import{t as a}from"./tooltip-DI_m69zk.js";import{t as o}from"./table-GdB-aSU5.js";import{t as s}from"./button-DsOd0cni.js";import{n as c}from"./LockOutlined-CM922FLC.js";import{t as l}from"./EyeOutlined-CdD0jpIv.js";import{t as u}from"./tag-CY8tAhzO.js";import{t as d}from"./useTranslation-C4ZVtLa2.js";import{Pt as f}from"./index-DMEx4_h0.js";import{t as p}from"./XinTable-C5M2dV7B.js";async function m(e,n){return t({url:`/ai/conversation/${e}/messages`,method:`get`,params:n})}var h=e(c(),1),g=e(n(),1),_=r(),{Title:v,Text:y}=i;function b(){let{t:e}=d(),[t,n]=(0,g.useState)(!1),[r,i]=(0,g.useState)(``),[c,b]=(0,g.useState)([]),[x,S]=(0,g.useState)(!1),[C,w]=(0,g.useState)(0),[T,E]=(0,g.useState)(1),[D,O]=(0,g.useState)(``),k=async(e,t)=>{S(!0);try{let n=(await m(e,{page:t,pageSize:20})).data.data;b(n.data),w(n.total)}finally{S(!1)}},A=async e=>{O(e.id),i(e.title||``),E(1),n(!0),await k(e.id,1)},j=e=>{E(e),k(D,e)},M=[{title:e(`ai.conversation.id`),dataIndex:`id`,hideInForm:!0,width:260,ellipsis:!0,align:`center`},{title:e(`ai.conversation.username`),dataIndex:`username`,hideInForm:!0,align:`center`,width:120,render:t=>t||e(`ai.conversation.noUser`)},{title:e(`ai.conversation.title`),dataIndex:`title`,valueType:`text`,ellipsis:!0},{title:e(`ai.conversation.messageCount`),dataIndex:`message_count`,hideInForm:!0,hideInSearch:!0,align:`center`,width:100},{title:e(`ai.conversation.createdAt`),dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`},{title:e(`ai.conversation.updatedAt`),dataIndex:`updated_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}],N=[{title:e(`ai.conversation.message.role`),dataIndex:`role`,width:100,render:t=>(0,_.jsx)(u,{color:{user:`blue`,assistant:`green`,system:`orange`}[t]||`default`,children:e(`ai.conversation.message.role.${t}`,t)})},{title:e(`ai.conversation.message.agent`),dataIndex:`agent`,width:150,ellipsis:!0},{title:e(`ai.conversation.message.content`),dataIndex:`content`,ellipsis:!0},{title:e(`ai.conversation.message.createdAt`),dataIndex:`created_at`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}];return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`mb-5`,children:[(0,_.jsx)(v,{level:3,children:e(`ai.conversation.page.title`)}),(0,_.jsx)(y,{type:`secondary`,children:e(`ai.conversation.page.description`)})]}),(0,_.jsx)(p,{api:`/ai/conversation`,columns:M,rowKey:`id`,accessName:`ai.conversation`,addShow:!1,editShow:!1,formProps:!1,operateProps:{fixed:`right`,width:120},operateRender:(t,n)=>[(0,_.jsx)(a,{title:e(`ai.conversation.viewMessages`),children:(0,_.jsx)(s,{type:`primary`,icon:(0,_.jsx)(l,{}),size:`small`,onClick:()=>A(t)})},`view`),n.del],scroll:{x:1100},cardProps:{variant:`borderless`}}),(0,_.jsx)(f,{title:`${e(`ai.conversation.messageTitle`)} - ${r}`,open:t,onClose:()=>n(!1),width:900,children:(0,_.jsx)(o,{dataSource:c,columns:N,rowKey:`id`,loading:x,pagination:{current:T,total:C,pageSize:20,onChange:j,showSizeChanger:!1},scroll:{x:700},size:`small`})})]})}export{b as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{t}from"./jsx-runtime-Dk2XcqH2.js";import{o as n}from"./chunk-OB3PAWPO-6cTVLEZE.js";import{t as r}from"./typography-DvDsdb2f.js";import{t as i}from"./tooltip-Up9y7xD6.js";import{t as a}from"./button-CdrnzceP.js";import{t as o}from"./badge-UxLSY7_N.js";import{n as s}from"./LockOutlined-CXWTaKH6.js";import{t as c}from"./useTranslation-BktiQivz.js";import{l,n as u}from"./index-kOY0oRfZ.js";import{t as d}from"./XinTable-Ckq4e_EB.js";var f=t(),p=e(s(),1),{Title:m,Text:h}=r;function g(){let{t:e}=c(),t=n(),r=u(e=>e.initDict),s=[{title:e(`system.dict.id`),dataIndex:`id`,hideInForm:!0,width:80,sorter:!0,align:`center`},{title:e(`system.dict.name`),dataIndex:`name`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:e(`system.dict.name.required`)}]},{title:e(`system.dict.code`),dataIndex:`code`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:e(`system.dict.code.required`)}]},{title:e(`system.dict.status`),dataIndex:`status`,valueType:`select`,filters:[{text:e(`system.dict.status.normal`),value:0},{text:e(`system.dict.status.disabled`),value:1}],colProps:{span:12},rules:[{required:!0,message:e(`system.dict.status.required`)}],fieldProps:{options:[{label:e(`system.dict.status.normal`),value:0},{label:e(`system.dict.status.disabled`),value:1}]},render:t=>t===0?(0,f.jsx)(o,{status:`success`,text:e(`system.dict.status.normal`)}):(0,f.jsx)(o,{status:`error`,text:e(`system.dict.status.disabled`)})},{title:e(`system.dict.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,fieldProps:{min:0,style:{width:`100%`}}},{title:e(`system.dict.describe`),dataIndex:`describe`,valueType:`textarea`,colProps:{span:24},hideInSearch:!0,ellipsis:!0},{title:e(`system.dict.createdAt`),dataIndex:`created_at`,render:e=>e?(0,p.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}],g=async()=>{await r(),window.$message?.success(e(`system.dict.refreshSuccess`))},_=e=>{t(`/system/dict/item?dictId=${e.id}&dictName=${encodeURIComponent(e.name||``)}&dictCode=${e.code}`)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mb-5`,children:[(0,f.jsx)(m,{level:3,children:e(`system.dict.page.title`)}),(0,f.jsx)(h,{type:`secondary`,children:e(`system.dict.page.description`)})]}),(0,f.jsx)(d,{api:`/system/dict/list`,columns:s,rowKey:`id`,accessName:`system.dict.list`,searchProps:!1,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},actionBarRender:t=>[t.add,(0,f.jsx)(a,{type:`primary`,onClick:g,children:e(`system.dict.refreshCache`)},`refresh`),t.keywordSearch],operateProps:{fixed:`right`,width:180},scroll:{x:1e3},operateRender:(t,n)=>[(0,f.jsx)(i,{title:e(`system.dict.manageItems`),children:(0,f.jsx)(a,{type:`default`,icon:(0,f.jsx)(l,{}),size:`small`,onClick:()=>_(t)})}),n.edit,n.del]})]})}export{g as default};
import{o as e}from"./request-xrnk7ZJV.js";import{t}from"./jsx-runtime-OfKoVykY.js";import{o as n}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as r}from"./typography-C81dpVAv.js";import{t as i}from"./tooltip-DI_m69zk.js";import{t as a}from"./button-DsOd0cni.js";import{t as o}from"./badge-CusEU3o_.js";import{n as s}from"./LockOutlined-CM922FLC.js";import{t as c}from"./useTranslation-C4ZVtLa2.js";import{l,n as u}from"./index-DMEx4_h0.js";import{t as d}from"./XinTable-C5M2dV7B.js";var f=t(),p=e(s(),1),{Title:m,Text:h}=r;function g(){let{t:e}=c(),t=n(),r=u(e=>e.initDict),s=[{title:e(`system.dict.id`),dataIndex:`id`,hideInForm:!0,width:80,sorter:!0,align:`center`},{title:e(`system.dict.name`),dataIndex:`name`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:e(`system.dict.name.required`)}]},{title:e(`system.dict.code`),dataIndex:`code`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:e(`system.dict.code.required`)}]},{title:e(`system.dict.status`),dataIndex:`status`,valueType:`select`,filters:[{text:e(`system.dict.status.normal`),value:0},{text:e(`system.dict.status.disabled`),value:1}],colProps:{span:12},rules:[{required:!0,message:e(`system.dict.status.required`)}],fieldProps:{options:[{label:e(`system.dict.status.normal`),value:0},{label:e(`system.dict.status.disabled`),value:1}]},render:t=>t===0?(0,f.jsx)(o,{status:`success`,text:e(`system.dict.status.normal`)}):(0,f.jsx)(o,{status:`error`,text:e(`system.dict.status.disabled`)})},{title:e(`system.dict.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,fieldProps:{min:0,style:{width:`100%`}}},{title:e(`system.dict.describe`),dataIndex:`describe`,valueType:`textarea`,colProps:{span:24},hideInSearch:!0,ellipsis:!0},{title:e(`system.dict.createdAt`),dataIndex:`created_at`,render:e=>e?(0,p.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}],g=async()=>{await r(),window.$message?.success(e(`system.dict.refreshSuccess`))},_=e=>{t(`/system/dict/item?dictId=${e.id}&dictName=${encodeURIComponent(e.name||``)}&dictCode=${e.code}`)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mb-5`,children:[(0,f.jsx)(m,{level:3,children:e(`system.dict.page.title`)}),(0,f.jsx)(h,{type:`secondary`,children:e(`system.dict.page.description`)})]}),(0,f.jsx)(d,{api:`/system/dict/list`,columns:s,rowKey:`id`,accessName:`system.dict.list`,searchProps:!1,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},actionBarRender:t=>[t.add,(0,f.jsx)(a,{type:`primary`,onClick:g,children:e(`system.dict.refreshCache`)},`refresh`),t.keywordSearch],operateProps:{fixed:`right`,width:180},scroll:{x:1e3},operateRender:(t,n)=>[(0,f.jsx)(i,{title:e(`system.dict.manageItems`),children:(0,f.jsx)(a,{type:`default`,icon:(0,f.jsx)(l,{}),size:`small`,onClick:()=>_(t)})}),n.edit,n.del]})]})}export{g as default};
-1
View File
@@ -1 +0,0 @@
import{o as e}from"./request-DWqS4XYU.js";import{Ct as t,Hn as n,Ln as r,Ot as i,Pr as a,Q as o,Wn as s,en as c,qt as l,tt as u,wn as d,wt as f}from"./jsx-runtime-Dk2XcqH2.js";var p=e(a()),m=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},h=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:a,textPaddingInline:o,orientationMargin:s,verticalMarginInline:l}=e,u=`${t}-rail`;return{[t]:{...c(e),borderBlockStart:`${r(a)} solid ${i}`,[u]:{borderBlockStart:`${r(a)} solid ${i}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:l,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${r(a)} solid ${i}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${r(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${r(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${i}`,[`${u}-start, ${u}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${u}-start`]:{width:`calc(${s} * 100%)`},[`${u}-end`]:{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${u}-start`]:{width:`calc(100% - ${s} * 100%)`},[`${u}-end`]:{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:o},"&-dashed":{background:`none`,borderColor:i,borderStyle:`dashed`,borderWidth:`${r(a)} 0 0`,[u]:{borderBlockStart:`${r(a)} dashed ${i}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${u}-start, ${u}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:i,borderStyle:`dotted`,borderWidth:`${r(a)} 0 0`,[u]:{borderBlockStart:`${r(a)} dotted ${i}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${u}-start`]:{width:0},[`${u}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${u}-start`]:{width:`100%`},[`${u}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},g=l(`Divider`,e=>{let t=d(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[h(t),m(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),_=[`left`,`right`,`center`,`start`,`end`],v=p.forwardRef((e,r)=>{let{getPrefixCls:a,direction:c,className:l,style:d,classNames:m,styles:h}=n(`divider`),{prefixCls:v,type:y,orientation:b,vertical:x,titlePlacement:S,orientationMargin:C,className:ee,rootClassName:w,children:T,dashed:E,variant:D=`solid`,plain:O,style:k,size:A,classNames:j,styles:M,...N}=e,P=a(`divider`,v),F=`${P}-rail`,[I,L]=g(P),R=o(A),z=!!T,B=_.includes(b||``),V=p.useMemo(()=>{let e=S??(B?b:`center`);return e===`left`?c===`rtl`?`end`:`start`:e===`right`?c===`rtl`?`start`:`end`:e},[c,b,S,B]),H=V===`start`&&C!=null,U=V===`end`&&C!=null,[W,G]=u(b,x,y),K={...e,orientation:W,titlePlacement:V,size:R},q=f(d),[J,Y]=t([m,j],[h,q,M],{props:K}),X=s(P,l,I,L,`${P}-${W}`,{[`${P}-with-text`]:z,[`${P}-with-text-${V}`]:z,[`${P}-dashed`]:!!E,[`${P}-${D}`]:D!==`solid`,[`${P}-plain`]:!!O,[`${P}-rtl`]:c===`rtl`,[`${P}-no-default-orientation-margin-start`]:H,[`${P}-no-default-orientation-margin-end`]:U,[`${P}-md`]:R===`medium`||R===`middle`,[`${P}-sm`]:R===`small`,[F]:!T,[J.rail]:J.rail&&!T},ee,w,J.root),Z=p.useMemo(()=>i(C)?C:/^\d+$/.test(C)?Number(C):C,[C]),Q={marginInlineStart:H?Z:void 0,marginInlineEnd:U?Z:void 0},$=p.useRef(null);return p.useImperativeHandle(r,()=>({nativeElement:$.current})),p.createElement(`div`,{ref:$,className:X,style:{...Y.root,...T?{}:Y.rail,...k},...N,role:`separator`},T&&!G&&p.createElement(p.Fragment,null,p.createElement(`div`,{className:s(F,`${F}-start`,J.rail),style:Y.rail}),p.createElement(`span`,{className:s(`${P}-inner-text`,J.content),style:{...Q,...Y.content}},T),p.createElement(`div`,{className:s(F,`${F}-end`,J.rail),style:Y.rail})))});export{v as t};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Ct as t,Hn as n,Ln as r,Ot as i,Pr as a,Q as o,Wn as s,en as c,qt as l,rr as u,tt as d,wn as f,wt as p}from"./jsx-runtime-OfKoVykY.js";var m=e(a()),h=e=>{let{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},g=e=>{let{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:a,textPaddingInline:o,orientationMargin:s,verticalMarginInline:l}=e,u=`${t}-rail`;return{[t]:{...c(e),borderBlockStart:`${r(a)} solid ${i}`,[u]:{borderBlockStart:`${r(a)} solid ${i}`},"&-vertical":{position:`relative`,top:`-0.06em`,display:`inline-block`,height:`0.9em`,marginInline:l,marginBlock:0,verticalAlign:`middle`,borderTop:0,borderInlineStart:`${r(a)} solid ${i}`},"&-horizontal":{display:`flex`,clear:`both`,width:`100%`,minWidth:`100%`,margin:`${r(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:`flex`,alignItems:`center`,margin:`${r(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:`nowrap`,textAlign:`center`,borderBlockStart:`0 ${i}`,[`${u}-start, ${u}-end`]:{width:`50%`,borderBlockStartColor:`inherit`,borderBlockEnd:0,content:`''`}},[`&-horizontal${t}-with-text-start`]:{[`${u}-start`]:{width:`calc(${s} * 100%)`},[`${u}-end`]:{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${u}-start`]:{width:`calc(100% - ${s} * 100%)`},[`${u}-end`]:{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:`inline-block`,paddingBlock:0,paddingInline:o},"&-dashed":{background:`none`,borderColor:i,borderStyle:`dashed`,borderWidth:`${r(a)} 0 0`,[u]:{borderBlockStart:`${r(a)} dashed ${i}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${u}-start, ${u}-end`]:{borderStyle:`dashed none none`}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:`none`,borderColor:i,borderStyle:`dotted`,borderWidth:`${r(a)} 0 0`,[u]:{borderBlockStart:`${r(a)} dotted ${i}`}},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:`dotted none none`}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:400,fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{[`${u}-start`]:{width:0},[`${u}-end`]:{width:`100%`},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${u}-start`]:{width:`100%`},[`${u}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}}}},_=l(`Divider`,e=>{let t=f(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[g(t),h(t)]},e=>({textPaddingInline:`1em`,orientationMargin:.05,verticalMarginInline:e.marginXS}),{unitless:{orientationMargin:!0}}),v=[`left`,`right`,`center`,`start`,`end`],y=m.forwardRef((e,r)=>{let{getPrefixCls:a,direction:c,className:l,style:f,classNames:h,styles:g}=n(`divider`),{prefixCls:y,type:b,orientation:x,vertical:S,titlePlacement:C,orientationMargin:w,className:T,rootClassName:E,children:D,dashed:O,variant:k=`solid`,plain:A,style:j,size:M,classNames:N,styles:ee,...P}=e,F=a(`divider`,y),I=`${F}-rail`,[L,R]=_(F),z=o(M),B=u(D),V=v.includes(x||``),H=m.useMemo(()=>{let e=C??(V?x:`center`);return e===`left`?c===`rtl`?`end`:`start`:e===`right`?c===`rtl`?`start`:`end`:e},[c,x,C,V]),U=H===`start`&&w!=null,W=H===`end`&&w!=null,[G,K]=d(x,S,b),q={...e,orientation:G,titlePlacement:H,size:z},J=p(f),[Y,X]=t([h,N],[g,J,ee],{props:q}),Z=s(F,l,L,R,`${F}-${G}`,{[`${F}-with-text`]:B,[`${F}-with-text-${H}`]:B,[`${F}-dashed`]:!!O,[`${F}-${k}`]:k!==`solid`,[`${F}-plain`]:!!A,[`${F}-rtl`]:c===`rtl`,[`${F}-no-default-orientation-margin-start`]:U,[`${F}-no-default-orientation-margin-end`]:W,[`${F}-md`]:z===`medium`||z===`middle`,[`${F}-sm`]:z===`small`,[I]:!B,[Y.rail]:Y.rail&&!B},T,E,Y.root),Q=m.useMemo(()=>i(w)?w:/^\d+$/.test(w)?Number(w):w,[w]),te={marginInlineStart:U?Q:void 0,marginInlineEnd:W?Q:void 0},$=m.useRef(null);return m.useImperativeHandle(r,()=>({nativeElement:$.current})),m.createElement(`div`,{ref:$,className:Z,style:{...X.root,...B?{}:X.rail,...j},...P,role:`separator`},B&&!K&&m.createElement(m.Fragment,null,m.createElement(`div`,{className:s(I,`${I}-start`,Y.rail),style:X.rail}),m.createElement(`span`,{className:s(`${F}-inner-text`,Y.content),style:{...te,...X.content}},D),m.createElement(`div`,{className:s(I,`${I}-end`,Y.rail),style:X.rail})))});export{y as t};
@@ -1 +1 @@
import{n as e}from"./request-DWqS4XYU.js";async function t(t,i,a){let o=localStorage.getItem(`token`),s,c=``;try{let n=await e.get(t,{baseURL:`/index.php`,params:i,responseType:`blob`,headers:o?{Authorization:`Bearer ${o}`}:{}});s=n.data,c=n.headers[`content-disposition`]||``}catch(e){let t=e?.response?.status,r=e?.response?.data;if(t===401){window.$message?.error(`您未登录,或者登录已经超时,请先登录!`),localStorage.removeItem(`token`),localStorage.removeItem(`auth-storage`),window.location.href=`/login`;return}if(r instanceof Blob){await n(r);return}window.$message?.error(`下载失败,请稍后重试`);return}if(s.type.includes(`application/json`)){await n(s);return}let l=r(c)||a,u=URL.createObjectURL(s),d=document.createElement(`a`);d.href=u,d.download=l,document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(u)}async function n(e){try{let t=JSON.parse(await e.text());window.$message?.error(t?.msg||`导出失败`)}catch{window.$message?.error(`导出失败`)}}function r(e){if(!e)return null;let t=e.match(/filename\*\s*=\s*(?:UTF-8|utf-8)''([^;]+)/i);if(t?.[1])try{return decodeURIComponent(t[1].trim())}catch{return null}let n=e.match(/filename\s*=\s*"?([^";]+)"?/i);if(n?.[1])try{return decodeURIComponent(n[1].trim())}catch{return n[1].trim()}return null}export{t};
import{n as e}from"./request-xrnk7ZJV.js";async function t(t,i,a){let o=localStorage.getItem(`token`),s,c=``;try{let n=await e.get(t,{baseURL:`/index.php`,params:i,responseType:`blob`,headers:o?{Authorization:`Bearer ${o}`}:{}});s=n.data,c=n.headers[`content-disposition`]||``}catch(e){let t=e?.response?.status,r=e?.response?.data;if(t===401){window.$message?.error(`您未登录,或者登录已经超时,请先登录!`),localStorage.removeItem(`token`),localStorage.removeItem(`auth-storage`),window.location.href=`/login`;return}if(r instanceof Blob){await n(r);return}window.$message?.error(`下载失败,请稍后重试`);return}if(s.type.includes(`application/json`)){await n(s);return}let l=r(c)||a,u=URL.createObjectURL(s),d=document.createElement(`a`);d.href=u,d.download=l,document.body.appendChild(d),d.click(),d.remove(),URL.revokeObjectURL(u)}async function n(e){try{let t=JSON.parse(await e.text());window.$message?.error(t?.msg||`导出失败`)}catch{window.$message?.error(`导出失败`)}}function r(e){if(!e)return null;let t=e.match(/filename\*\s*=\s*(?:UTF-8|utf-8)''([^;]+)/i);if(t?.[1])try{return decodeURIComponent(t[1].trim())}catch{return null}let n=e.match(/filename\s*=\s*"?([^";]+)"?/i);if(n?.[1])try{return decodeURIComponent(n[1].trim())}catch{return n[1].trim()}return null}export{t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Bn as t,Pr as n,Wn as r,Z as i,n as a}from"./jsx-runtime-Dk2XcqH2.js";import{t as o}from"./space-DZlFkFGY.js";import{t as s}from"./button-CdrnzceP.js";import{t as c}from"./dropdown-CHwW7vyY.js";var l=e(n()),u=e=>{let{getPopupContainer:n,getPrefixCls:u,direction:d}=l.useContext(t),{prefixCls:f,type:p=`default`,danger:m,disabled:h,loading:g,onClick:_,htmlType:v,children:y,className:b,menu:x,arrow:S,autoFocus:C,trigger:w,align:T,open:E,onOpenChange:D,placement:O,getPopupContainer:k,href:A,icon:j=l.createElement(a,null),title:M,buttonsRender:N=e=>e,mouseEnterDelay:P,mouseLeaveDelay:F,overlayClassName:I,overlayStyle:L,destroyOnHidden:R,destroyPopupOnHide:z,dropdownRender:B,popupRender:V,...H}=e,U=u(`dropdown`,f),W=`${U}-button`,G={menu:x,arrow:S,autoFocus:C,align:T,disabled:h,trigger:h?[]:w,onOpenChange:D,getPopupContainer:k||n,mouseEnterDelay:P,mouseLeaveDelay:F,classNames:{root:I},styles:{root:L},destroyOnHidden:R,popupRender:V||B},{compactSize:K,compactItemClassnames:q}=i(U,d),J=r(W,q,b);`destroyPopupOnHide`in e&&(G.destroyPopupOnHide=z),`open`in e&&(G.open=E),G.placement=`placement`in e?O:d===`rtl`?`bottomLeft`:`bottomRight`;let[Y,X]=N([l.createElement(s,{type:p,danger:m,disabled:h,loading:g,onClick:_,htmlType:v,href:A,title:M},y),l.createElement(s,{type:p,danger:m,icon:j})]);return l.createElement(o.Compact,{className:J,size:K,block:!0,...H},Y,l.createElement(c,{...G},X))};u.__ANT_BUTTON=!0;var d=c;d.Button=u;export{d as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Bn as t,Pr as n,Wn as r,Z as i,n as a}from"./jsx-runtime-OfKoVykY.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./dropdown-CJq6vh0e.js";var l=e(n()),u=e=>{let{getPopupContainer:n,getPrefixCls:u,direction:d}=l.useContext(t),{prefixCls:f,type:p=`default`,danger:m,disabled:h,loading:g,onClick:_,htmlType:v,children:y,className:b,menu:x,arrow:S,autoFocus:C,trigger:w,align:T,open:E,onOpenChange:D,placement:O,getPopupContainer:k,href:A,icon:j=l.createElement(a,null),title:M,buttonsRender:N=e=>e,mouseEnterDelay:P,mouseLeaveDelay:F,overlayClassName:I,overlayStyle:L,destroyOnHidden:R,destroyPopupOnHide:z,dropdownRender:B,popupRender:V,...H}=e,U=u(`dropdown`,f),W=`${U}-button`,G={menu:x,arrow:S,autoFocus:C,align:T,disabled:h,trigger:h?[]:w,onOpenChange:D,getPopupContainer:k||n,mouseEnterDelay:P,mouseLeaveDelay:F,classNames:{root:I},styles:{root:L},destroyOnHidden:R,popupRender:V||B},{compactSize:K,compactItemClassnames:q}=i(U,d),J=r(W,q,b);`destroyPopupOnHide`in e&&(G.destroyPopupOnHide=z),`open`in e&&(G.open=E),G.placement=`placement`in e?O:d===`rtl`?`bottomLeft`:`bottomRight`;let[Y,X]=N([l.createElement(s,{type:p,danger:m,disabled:h,loading:g,onClick:_,htmlType:v,href:A,title:M},y),l.createElement(s,{type:p,danger:m,icon:j})]);return l.createElement(o.Compact,{className:J,size:K,block:!0,...H},Y,l.createElement(c,{...G},X))};u.__ANT_BUTTON=!0;var d=c;d.Button=u;export{d as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./typography-DvDsdb2f.js";import{t as r}from"./button-CdrnzceP.js";import{t as i}from"./card-CAlqEh_K.js";import{t as a}from"./result-DWumm-D4.js";import{G as o}from"./index-kOY0oRfZ.js";e();var s=t(),{Paragraph:c,Text:l}=n,u=()=>(0,s.jsx)(i,{variant:`borderless`,children:(0,s.jsx)(a,{status:`error`,title:`Submission Failed`,subTitle:`Please check and modify the following information before resubmitting.`,extra:[(0,s.jsx)(r,{type:`primary`,children:`Go Console`},`console`),(0,s.jsx)(r,{children:`Buy Again`},`buy`)],children:(0,s.jsxs)(`div`,{className:`desc`,children:[(0,s.jsx)(c,{children:(0,s.jsx)(l,{strong:!0,style:{fontSize:16},children:`The content you submitted has the following error:`})}),(0,s.jsxs)(c,{children:[(0,s.jsx)(o,{className:`site-result-demo-error-icon`}),` Your account has been frozen. `,(0,s.jsx)(`a`,{children:`Thaw immediately >`})]}),(0,s.jsxs)(c,{children:[(0,s.jsx)(o,{className:`site-result-demo-error-icon`}),` Your account is not yet eligible to apply. `,(0,s.jsx)(`a`,{children:`Apply Unlock >`})]})]})})});export{u as default};
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./typography-C81dpVAv.js";import{t as r}from"./button-DsOd0cni.js";import{t as i}from"./card-C-jMUkpS.js";import{t as a}from"./result-CiRRu9Vo.js";import{G as o}from"./index-DMEx4_h0.js";e();var s=t(),{Paragraph:c,Text:l}=n,u=()=>(0,s.jsx)(i,{variant:`borderless`,children:(0,s.jsx)(a,{status:`error`,title:`Submission Failed`,subTitle:`Please check and modify the following information before resubmitting.`,extra:[(0,s.jsx)(r,{type:`primary`,children:`Go Console`},`console`),(0,s.jsx)(r,{children:`Buy Again`},`buy`)],children:(0,s.jsxs)(`div`,{className:`desc`,children:[(0,s.jsx)(c,{children:(0,s.jsx)(l,{strong:!0,style:{fontSize:16},children:`The content you submitted has the following error:`})}),(0,s.jsxs)(c,{children:[(0,s.jsx)(o,{className:`site-result-demo-error-icon`}),` Your account has been frozen. `,(0,s.jsx)(`a`,{children:`Thaw immediately >`})]}),(0,s.jsxs)(c,{children:[(0,s.jsx)(o,{className:`site-result-demo-error-icon`}),` Your account is not yet eligible to apply. `,(0,s.jsx)(`a`,{children:`Apply Unlock >`})]})]})})});export{u as default};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./jsx-runtime-Dk2XcqH2.js";import{t}from"./space-DZlFkFGY.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{n as i,t as a}from"./row-O-YRtaDs.js";import{Vt as o}from"./index-kOY0oRfZ.js";var s=e(),c=()=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(r,{style:{marginBottom:16},children:[(0,s.jsx)(o,{items:[{title:`多级菜单`},{title:`二级页面`}]}),(0,s.jsx)(`h2`,{style:{marginTop:16,marginBottom:0},children:`二级页面`})]}),(0,s.jsxs)(a,{gutter:[16,16],children:[(0,s.jsx)(i,{span:24,children:(0,s.jsx)(r,{style:{height:200}})}),(0,s.jsx)(i,{span:16,children:(0,s.jsx)(r,{style:{height:200}})}),(0,s.jsx)(i,{span:8,children:(0,s.jsx)(r,{style:{height:200}})})]}),(0,s.jsx)(r,{style:{marginTop:16},children:(0,s.jsxs)(t,{children:[(0,s.jsx)(n,{children:`重置`}),(0,s.jsx)(n,{type:`primary`,children:`提交`})]})})]});export{c as default};
import{t as e}from"./jsx-runtime-OfKoVykY.js";import{t}from"./space-JYtHxLjg.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{n as i,t as a}from"./row-DM2jDy-f.js";import{Vt as o}from"./index-DMEx4_h0.js";var s=e(),c=()=>(0,s.jsxs)(`div`,{children:[(0,s.jsxs)(r,{style:{marginBottom:16},children:[(0,s.jsx)(o,{items:[{title:`多级菜单`},{title:`二级页面`}]}),(0,s.jsx)(`h2`,{style:{marginTop:16,marginBottom:0},children:`二级页面`})]}),(0,s.jsxs)(a,{gutter:[16,16],children:[(0,s.jsx)(i,{span:24,children:(0,s.jsx)(r,{style:{height:200}})}),(0,s.jsx)(i,{span:16,children:(0,s.jsx)(r,{style:{height:200}})}),(0,s.jsx)(i,{span:8,children:(0,s.jsx)(r,{style:{height:200}})})]}),(0,s.jsx)(r,{style:{marginTop:16},children:(0,s.jsxs)(t,{children:[(0,s.jsx)(n,{children:`重置`}),(0,s.jsx)(n,{type:`primary`,children:`提交`})]})})]});export{c as default};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{$n as t,Bn as n,Pr as r,Wn as i,nr as a,qt as o,tt as s,wn as c}from"./jsx-runtime-Dk2XcqH2.js";import{n as l}from"./space-DZlFkFGY.js";var u=e(r()),d=[`wrap`,`nowrap`,`wrap-reverse`],f=[`flex-start`,`flex-end`,`start`,`end`,`center`,`space-between`,`space-around`,`space-evenly`,`stretch`,`normal`,`left`,`right`],p=[`center`,`start`,`end`,`flex-start`,`flex-end`,`self-start`,`self-end`,`baseline`,`normal`,`stretch`],m=(e,t)=>{let n=t.wrap===!0?`wrap`:t.wrap;return{[`${e}-wrap-${n}`]:n&&d.includes(n)}},h=(e,t)=>{let n={};return p.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},g=(e,t)=>{let n={};return f.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},_=(e,t)=>i({...m(e,t),...h(e,t),...g(e,t)}),v=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,margin:0,padding:0,"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`},"&:empty":{display:`none`}}}},y=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},b=e=>{let{componentCls:t}=e,n={};return d.forEach(e=>{n[`${t}-wrap-${e}`]={flexWrap:e}}),n},x=e=>{let{componentCls:t}=e,n={};return p.forEach(e=>{n[`${t}-align-${e}`]={alignItems:e}}),n},S=e=>{let{componentCls:t}=e,n={};return f.forEach(e=>{n[`${t}-justify-${e}`]={justifyContent:e}}),n},C=o(`Flex`,e=>{let{paddingXS:t,padding:n,paddingLG:r}=e,i=c(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[v(i),y(i),b(i),x(i),S(i)]},()=>({}),{resetStyle:!1}),w=u.forwardRef((e,r)=>{let{prefixCls:o,rootClassName:c,className:d,style:f,flex:p,gap:m,vertical:h,orientation:g,component:v=`div`,children:y,...b}=e,{flex:x,direction:S,getPrefixCls:w}=u.useContext(n),T=w(`flex`,o),[E,D]=C(T),[,O]=s(g,h??x?.vertical),k=i(d,c,x?.className,T,E,D,_(T,{...e,vertical:O}),{[`${T}-rtl`]:S===`rtl`,[`${T}-gap-${m}`]:l(m),[`${T}-vertical`]:O}),A={...x?.style,...f};return a(p)&&(A.flex=p),a(m)&&!l(m)&&(A.gap=m),u.createElement(v,{ref:r,className:k,style:A,...t(b,[`justify`,`wrap`,`align`])},y)});export{w as t};
import{o as e}from"./request-xrnk7ZJV.js";import{$n as t,Bn as n,Pr as r,Wn as i,nr as a,qt as o,tt as s,wn as c}from"./jsx-runtime-OfKoVykY.js";import{n as l}from"./space-JYtHxLjg.js";var u=e(r()),d=[`wrap`,`nowrap`,`wrap-reverse`],f=[`flex-start`,`flex-end`,`start`,`end`,`center`,`space-between`,`space-around`,`space-evenly`,`stretch`,`normal`,`left`,`right`],p=[`center`,`start`,`end`,`flex-start`,`flex-end`,`self-start`,`self-end`,`baseline`,`normal`,`stretch`],m=(e,t)=>{let n=t.wrap===!0?`wrap`:t.wrap;return{[`${e}-wrap-${n}`]:n&&d.includes(n)}},h=(e,t)=>{let n={};return p.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},g=(e,t)=>{let n={};return f.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},_=(e,t)=>i({...m(e,t),...h(e,t),...g(e,t)}),v=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,margin:0,padding:0,"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`},"&:empty":{display:`none`}}}},y=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},b=e=>{let{componentCls:t}=e,n={};return d.forEach(e=>{n[`${t}-wrap-${e}`]={flexWrap:e}}),n},x=e=>{let{componentCls:t}=e,n={};return p.forEach(e=>{n[`${t}-align-${e}`]={alignItems:e}}),n},S=e=>{let{componentCls:t}=e,n={};return f.forEach(e=>{n[`${t}-justify-${e}`]={justifyContent:e}}),n},C=o(`Flex`,e=>{let{paddingXS:t,padding:n,paddingLG:r}=e,i=c(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[v(i),y(i),b(i),x(i),S(i)]},()=>({}),{resetStyle:!1}),w=u.forwardRef((e,r)=>{let{prefixCls:o,rootClassName:c,className:d,style:f,flex:p,gap:m,vertical:h,orientation:g,component:v=`div`,children:y,...b}=e,{flex:x,direction:S,getPrefixCls:w}=u.useContext(n),T=w(`flex`,o),[E,D]=C(T),[,O]=s(g,h??x?.vertical),k=i(d,c,x?.className,T,E,D,_(T,{...e,vertical:O}),{[`${T}-rtl`]:S===`rtl`,[`${T}-gap-${m}`]:l(m),[`${T}-vertical`]:O}),A={...x?.style,...f};return a(p)&&(A.flex=p),a(m)&&!l(m)&&(A.gap=m),u.createElement(v,{ref:r,className:k,style:A,...t(b,[`justify`,`wrap`,`align`])},y)});export{w as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./request-DWqS4XYU.js";import{i as t,n,r,t as i}from"./middleware-BHa9fbqL.js";var a={themeScheme:`light`,background:`transparent`,colorPrimary:`#1677ff`,borderRadius:8,colorText:`#000`,colorBg:`#fff`,bodyBg:`#f9f9f9`,footerBg:`#fff`,headerBg:`#fff`,headerColor:`#000`,siderBg:`#fff`,siderColor:`#000`,colorBorder:`#f0f0f0`,algorithm:`defaultAlgorithm`},o={themeScheme:`dark`,background:`transparent`,borderRadius:8,colorPrimary:`#1677ff`,colorText:`#fff`,colorBg:`#000`,bodyBg:`#000`,footerBg:`#141414`,headerBg:`#141414`,headerColor:`#fff`,siderBg:`#141414`,siderColor:`#fff`,colorBorder:`#282828`,algorithm:`darkAlgorithm`},s={themeScheme:`light`,colorPrimary:`#1677ff`,colorError:`#ff4d4f`,colorSuccess:`#52c41a`,colorWarning:`#faad14`,borderRadius:10,controlHeight:32,headerPadding:20,headerHeight:56,siderWeight:226,bodyPadding:20,fixedFooter:!1},c=()=>e({url:`/index`,method:`get`}),l={logo:`https://file.xinadmin.cn/file/favicons.ico`,title:`Xin Admin`,subtitle:`基于 Ant Design 的后台管理框架`,describe:`Xin Admin 是一个基于 Ant Design 的后台管理框架`,layout:`side`,themeConfig:{...a,...s},themeDrawer:!1},u=e=>({initWebInfo:async()=>{try{let t=await c();t.data.data&&e(t.data.data)}catch(e){console.error(`获取网站信息失败:`,e)}},setLayout:t=>{e({layout:t})},setThemeConfig:t=>{e({themeConfig:t})},setThemeDrawer:t=>{e({themeDrawer:t})}}),d=t()(n(r((...e)=>({...l,...u(...e)}),{name:`global-storage`,storage:i(()=>localStorage)}),{name:`XinAdmin-Global`}));export{a as i,s as n,o as r,d as t};
import{t as e}from"./request-xrnk7ZJV.js";import{i as t,n,r,t as i}from"./middleware-HnwFNbpD.js";var a={themeScheme:`light`,background:`transparent`,colorPrimary:`#1677ff`,borderRadius:8,colorText:`#000`,colorBg:`#fff`,bodyBg:`#f9f9f9`,footerBg:`#fff`,headerBg:`#fff`,headerColor:`#000`,siderBg:`#fff`,siderColor:`#000`,colorBorder:`#f0f0f0`,algorithm:`defaultAlgorithm`},o={themeScheme:`dark`,background:`transparent`,borderRadius:8,colorPrimary:`#1677ff`,colorText:`#fff`,colorBg:`#000`,bodyBg:`#000`,footerBg:`#141414`,headerBg:`#141414`,headerColor:`#fff`,siderBg:`#141414`,siderColor:`#fff`,colorBorder:`#282828`,algorithm:`darkAlgorithm`},s={themeScheme:`light`,colorPrimary:`#1677ff`,colorError:`#ff4d4f`,colorSuccess:`#52c41a`,colorWarning:`#faad14`,borderRadius:10,controlHeight:32,headerPadding:20,headerHeight:56,siderWeight:226,bodyPadding:20,fixedFooter:!1},c=()=>e({url:`/index`,method:`get`}),l={logo:`https://file.xinadmin.cn/file/favicons.ico`,title:`Xin Admin`,subtitle:`基于 Ant Design 的后台管理框架`,describe:`Xin Admin 是一个基于 Ant Design 的后台管理框架`,layout:`side`,themeConfig:{...a,...s},themeDrawer:!1},u=e=>({initWebInfo:async()=>{try{let t=await c();t.data.data&&e(t.data.data)}catch(e){console.error(`获取网站信息失败:`,e)}},setLayout:t=>{e({layout:t})},setThemeConfig:t=>{e({themeConfig:t})},setThemeDrawer:t=>{e({themeDrawer:t})}}),d=t()(n(r((...e)=>({...l,...u(...e)}),{name:`global-storage`,storage:i(()=>localStorage)}),{name:`XinAdmin-Global`}));export{a as i,s as n,o as r,d as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./request-DWqS4XYU.js";import{t}from"./download-2nlDzZA-.js";async function n(t){return e({url:`/product/goods/options`,method:`get`,params:t?{keyword:t}:{}})}async function r(e={}){return t(`/product/goods/export`,e,`商品列表.xlsx`)}async function i(){return t(`/product/goods/export`,{template:1},`商品导入模板.xlsx`)}async function a(t){let n=new FormData;return n.append(`file`,t),e({url:`/product/goods/import`,method:`post`,data:n,headers:{"Content-Type":`multipart/form-data`},timeout:6e4})}async function o(t){return e({url:`/product/goods/batch`,method:`delete`,data:{ids:t}})}async function s(t){return e({url:`/product/goods/priceMatrix`,method:`get`,params:t})}async function c(t){return e({url:`/product/goods/batchPrice`,method:`put`,data:{updates:t}})}export{s as a,r as i,c as n,n as o,i as r,a as s,o as t};
import{t as e}from"./request-xrnk7ZJV.js";import{t}from"./download-Cf6J4R3J.js";async function n(t){return e({url:`/product/goods/options`,method:`get`,params:t?{keyword:t}:{}})}async function r(e={}){return t(`/product/goods/export`,e,`商品列表.xlsx`)}async function i(){return t(`/product/goods/export`,{template:1},`商品导入模板.xlsx`)}async function a(t){let n=new FormData;return n.append(`file`,t),e({url:`/product/goods/import`,method:`post`,data:n,headers:{"Content-Type":`multipart/form-data`},timeout:6e4})}async function o(t){return e({url:`/product/goods/batch`,method:`delete`,data:{ids:t}})}async function s(t){return e({url:`/product/goods/priceMatrix`,method:`get`,params:t})}async function c(t){return e({url:`/product/goods/batchPrice`,method:`put`,data:{updates:t}})}export{s as a,r as i,c as n,n as o,i as r,a as s,o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{t as r}from"./typography-DvDsdb2f.js";import{t as i}from"./space-DZlFkFGY.js";import{c as a,t as o}from"./XinForm-BVjxA6JJ.js";import{t as s}from"./card-CAlqEh_K.js";import{t as c}from"./divider-D8FfJHwP.js";import{Tt as l}from"./index-kOY0oRfZ.js";var u=e(t(),1),d=n(),{Title:f,Paragraph:p,Text:m}=r,h=()=>{let[e,t]=(0,u.useState)(``),n=(0,u.useRef)(void 0);return(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(r,{style:{margin:`12px 0 24px 0`},children:[(0,d.jsx)(f,{level:2,children:`图标选择器组件示例`}),(0,d.jsx)(p,{children:`基于 Ant Design Select + Modal + Tabs 封装的图标选择器组件,支持多分类图标选择。`})]}),(0,d.jsxs)(i,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[(0,d.jsxs)(s,{title:`独立使用`,bordered:!0,children:[(0,d.jsx)(m,{children:`基础用法:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:e,onChange:e=>{t(e||``),e?l.success(`选中图标: ${e}`):l.info(`已清空图标`)},placeholder:`请选择图标`})}),(0,d.jsx)(c,{}),(0,d.jsx)(m,{children:`禁用状态:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:`HomeOutlined`,disabled:!0,placeholder:`禁用状态`})}),(0,d.jsx)(c,{}),(0,d.jsx)(m,{children:`只读状态:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:`SettingOutlined`,readonly:!0,placeholder:`只读状态`})}),(0,d.jsx)(m,{type:`secondary`,className:`mt-2 block text-sm`,children:`只读模式下不能打开选择弹窗,但可以清空`})]}),(0,d.jsx)(s,{title:`在 XinForm 中使用`,bordered:!0,children:(0,d.jsx)(o,{formRef:n,columns:[{dataIndex:`systemName`,title:`系统名称`,valueType:`text`,rules:[{required:!0,message:`请输入系统名称`}],fieldProps:{placeholder:`请输入系统名称`}},{dataIndex:`systemIcon`,title:`系统图标`,rules:[{required:!0,message:`请选择系统图标`}],fieldRender:()=>(0,d.jsx)(a,{placeholder:`请选择系统图标`})},{dataIndex:`description`,title:`系统描述`,valueType:`textarea`,fieldProps:{placeholder:`请输入系统描述`,rows:4}}],onFinish:async e=>(console.log(`XinForm 提交:`,e),l.success(`提交成功!`),l.info(`系统图标: ${e.systemIcon}`),!0),submitter:{submitText:`提交表单`,render:e=>e.submit}})})]})]})};export{h as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{t as r}from"./typography-C81dpVAv.js";import{t as i}from"./space-JYtHxLjg.js";import{c as a,t as o}from"./XinForm-D9piiVGF.js";import{t as s}from"./card-C-jMUkpS.js";import{t as c}from"./divider-j0hopRxQ.js";import{Tt as l}from"./index-DMEx4_h0.js";var u=e(t(),1),d=n(),{Title:f,Paragraph:p,Text:m}=r,h=()=>{let[e,t]=(0,u.useState)(``),n=(0,u.useRef)(void 0);return(0,d.jsxs)(`div`,{children:[(0,d.jsxs)(r,{style:{margin:`12px 0 24px 0`},children:[(0,d.jsx)(f,{level:2,children:`图标选择器组件示例`}),(0,d.jsx)(p,{children:`基于 Ant Design Select + Modal + Tabs 封装的图标选择器组件,支持多分类图标选择。`})]}),(0,d.jsxs)(i,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[(0,d.jsxs)(s,{title:`独立使用`,bordered:!0,children:[(0,d.jsx)(m,{children:`基础用法:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:e,onChange:e=>{t(e||``),e?l.success(`选中图标: ${e}`):l.info(`已清空图标`)},placeholder:`请选择图标`})}),(0,d.jsx)(c,{}),(0,d.jsx)(m,{children:`禁用状态:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:`HomeOutlined`,disabled:!0,placeholder:`禁用状态`})}),(0,d.jsx)(c,{}),(0,d.jsx)(m,{children:`只读状态:`}),(0,d.jsx)(`div`,{className:`mt-2`,children:(0,d.jsx)(a,{value:`SettingOutlined`,readonly:!0,placeholder:`只读状态`})}),(0,d.jsx)(m,{type:`secondary`,className:`mt-2 block text-sm`,children:`只读模式下不能打开选择弹窗,但可以清空`})]}),(0,d.jsx)(s,{title:`在 XinForm 中使用`,bordered:!0,children:(0,d.jsx)(o,{formRef:n,columns:[{dataIndex:`systemName`,title:`系统名称`,valueType:`text`,rules:[{required:!0,message:`请输入系统名称`}],fieldProps:{placeholder:`请输入系统名称`}},{dataIndex:`systemIcon`,title:`系统图标`,rules:[{required:!0,message:`请选择系统图标`}],fieldRender:()=>(0,d.jsx)(a,{placeholder:`请选择系统图标`})},{dataIndex:`description`,title:`系统描述`,valueType:`textarea`,fieldProps:{placeholder:`请输入系统描述`,rows:4}}],onFinish:async e=>(console.log(`XinForm 提交:`,e),l.success(`提交成功!`),l.info(`系统图标: ${e.systemIcon}`),!0),submitter:{submitText:`提交表单`,render:e=>e.submit}})})]})]})};export{h as default};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{t as r}from"./typography-DvDsdb2f.js";import{t as i}from"./space-DZlFkFGY.js";import{t as a}from"./button-CdrnzceP.js";import{t as o}from"./card-CAlqEh_K.js";import{t as s}from"./form-DhDb91Ug.js";import{t as c}from"./ImageUploader-CtnAIrrB.js";var l=e(t(),1),u=n(),{Title:d,Paragraph:f}=r,p=()=>{let[e]=s.useForm(),[t,n]=(0,l.useState)(null),[p,m]=(0,l.useState)([]);return(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(r,{style:{margin:`12px 0 24px 0`},children:[(0,u.jsx)(d,{level:2,children:`图片上传组件示例`}),(0,u.jsx)(f,{children:`基于 Ant Design Upload 封装的图片上传组件,支持图片剪裁、多张图片上传、尺寸限制、禁用状态等。`})]}),(0,u.jsx)(o,{title:`基础用法`,style:{marginBottom:24},children:(0,u.jsxs)(s,{form:e,layout:`vertical`,children:[(0,u.jsx)(s.Item,{label:`单张图片上传`,name:`avatar`,extra:`支持单张图片上传,最大 5MB,尺寸不超过 1920x1080`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,value:t,onChange:e=>n(e)})}),(0,u.jsx)(s.Item,{label:`多张图片上传`,name:`gallery`,extra:`支持最多 5 张图片上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`multiple`,maxCount:5,value:p,onChange:e=>m(e)})}),(0,u.jsx)(s.Item,{children:(0,u.jsxs)(i,{children:[(0,u.jsx)(a,{type:`primary`,onClick:async()=>{try{let n=await e.validateFields();console.log(`Form values:`,n),console.log(`Single image:`,t),console.log(`Multiple images:`,p)}catch(e){console.error(`Validation failed:`,e)}},children:`提交`}),(0,u.jsx)(a,{onClick:()=>{e.resetFields(),n(null),m([])},children:`重置`})]})})]})}),(0,u.jsx)(o,{title:`高级配置`,style:{marginBottom:24},children:(0,u.jsxs)(s,{layout:`vertical`,children:[(0,u.jsx)(s.Item,{label:`自定义尺寸限制`,extra:`限制图片尺寸为 800x600,大小不超过 2MB`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,maxWidth:800,maxHeight:600,maxSize:2})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 自由裁剪`,extra:`启用裁剪功能,可自由调整裁剪区域`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 1:1 正方形`,extra:`固定 1:1 比例裁剪,适合头像上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{aspect:1}})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 圆形裁剪`,extra:`圆形裁剪模式,适合头像上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{cropShape:`round`,aspect:1}})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 16:9 宽屏`,extra:`固定 16:9 比例裁剪,适合横幅图片`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{aspect:16/9}})}),(0,u.jsx)(s.Item,{label:`禁用状态`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,disabled:!0})})]})})]})};export{p as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{t as r}from"./typography-C81dpVAv.js";import{t as i}from"./space-JYtHxLjg.js";import{t as a}from"./button-DsOd0cni.js";import{t as o}from"./card-C-jMUkpS.js";import{t as s}from"./form-CDfHsmlW.js";import{t as c}from"./ImageUploader-DviVc8Fr.js";var l=e(t(),1),u=n(),{Title:d,Paragraph:f}=r,p=()=>{let[e]=s.useForm(),[t,n]=(0,l.useState)(null),[p,m]=(0,l.useState)([]);return(0,u.jsxs)(`div`,{children:[(0,u.jsxs)(r,{style:{margin:`12px 0 24px 0`},children:[(0,u.jsx)(d,{level:2,children:`图片上传组件示例`}),(0,u.jsx)(f,{children:`基于 Ant Design Upload 封装的图片上传组件,支持图片剪裁、多张图片上传、尺寸限制、禁用状态等。`})]}),(0,u.jsx)(o,{title:`基础用法`,style:{marginBottom:24},children:(0,u.jsxs)(s,{form:e,layout:`vertical`,children:[(0,u.jsx)(s.Item,{label:`单张图片上传`,name:`avatar`,extra:`支持单张图片上传,最大 5MB,尺寸不超过 1920x1080`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,value:t,onChange:e=>n(e)})}),(0,u.jsx)(s.Item,{label:`多张图片上传`,name:`gallery`,extra:`支持最多 5 张图片上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`multiple`,maxCount:5,value:p,onChange:e=>m(e)})}),(0,u.jsx)(s.Item,{children:(0,u.jsxs)(i,{children:[(0,u.jsx)(a,{type:`primary`,onClick:async()=>{try{let n=await e.validateFields();console.log(`Form values:`,n),console.log(`Single image:`,t),console.log(`Multiple images:`,p)}catch(e){console.error(`Validation failed:`,e)}},children:`提交`}),(0,u.jsx)(a,{onClick:()=>{e.resetFields(),n(null),m([])},children:`重置`})]})})]})}),(0,u.jsx)(o,{title:`高级配置`,style:{marginBottom:24},children:(0,u.jsxs)(s,{layout:`vertical`,children:[(0,u.jsx)(s.Item,{label:`自定义尺寸限制`,extra:`限制图片尺寸为 800x600,大小不超过 2MB`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,maxWidth:800,maxHeight:600,maxSize:2})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 自由裁剪`,extra:`启用裁剪功能,可自由调整裁剪区域`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 1:1 正方形`,extra:`固定 1:1 比例裁剪,适合头像上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{aspect:1}})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 圆形裁剪`,extra:`圆形裁剪模式,适合头像上传`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{cropShape:`round`,aspect:1}})}),(0,u.jsx)(s.Item,{label:`裁剪功能 - 16:9 宽屏`,extra:`固定 16:9 比例裁剪,适合横幅图片`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,croppable:!0,cropperOptions:{aspect:16/9}})}),(0,u.jsx)(s.Item,{label:`禁用状态`,children:(0,u.jsx)(c,{action:`/sys/file/list/upload/image`,mode:`single`,disabled:!0})})]})})]})};export{p as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{title:`Your operation has been executed`,extra:(0,a.jsx)(n,{type:`primary`,children:`Go Console`},`console`)})});export{o as default};
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{title:`Your operation has been executed`,extra:(0,a.jsx)(n,{type:`primary`,children:`Go Console`},`console`)})});export{o as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{o as r,s as i}from"./chunk-OB3PAWPO-6cTVLEZE.js";import{t as a}from"./typography-DvDsdb2f.js";import{t as o}from"./space-DZlFkFGY.js";import{t as s}from"./button-CdrnzceP.js";import{t as c}from"./LeftOutlined-fCZD1YMc.js";import{t as l}from"./badge-UxLSY7_N.js";import{n as u}from"./LockOutlined-CXWTaKH6.js";import{i as d,s as f}from"./XinForm-BVjxA6JJ.js";import{t as p}from"./tag-Dh4xJ3v_.js";import{t as m}from"./useTranslation-BktiQivz.js";import{t as h}from"./XinTable-Ckq4e_EB.js";var g=[{label:`默认`,value:`default`},{label:`蓝色`,value:`blue`},{label:`绿色`,value:`green`},{label:`红色`,value:`red`},{label:`橙色`,value:`orange`},{label:`紫色`,value:`purple`},{label:`青色`,value:`cyan`},{label:`金色`,value:`gold`},{label:`绿黄色`,value:`lime`},{label:`极客蓝`,value:`geekblue`},{label:`品红`,value:`magenta`},{label:`火山红`,value:`volcano`}],_=e(t(),1),v=e(u(),1),y=n();function b(){let{t:e}=m(),t=r(),[n]=i(),u=n.get(`dictId`),b=n.get(`dictName`)||``,x=n.get(`dictCode`)||``,[S,C]=(0,_.useState)({id:u?parseInt(u):0,name:decodeURIComponent(b),code:x});(0,_.useEffect)(()=>{u&&C({id:parseInt(u),name:decodeURIComponent(b),code:x})},[u,b,x]);let w=[{title:e(`system.system.dict.item.id`),dataIndex:`id`,hideInForm:!0,width:80,align:`center`},{title:e(`system.system.dict.item.label`),dataIndex:`label`,valueType:`text`,rules:[{required:!0,message:e(`system.system.dict.item.label.required`)}]},{title:e(`system.system.dict.item.value`),dataIndex:`value`,valueType:`text`,rules:[{required:!0,message:e(`system.system.dict.item.value.required`)}]},{title:e(`system.system.dict.item.color`),dataIndex:`color`,valueType:`select`,colProps:{span:12},initialValue:`default`,fieldProps:{options:g.map(e=>({label:(0,y.jsx)(p,{color:e.value,children:e.label}),value:e.value}))},render:e=>{let t=g.find(t=>t.value===e);return(0,y.jsx)(p,{color:e,children:t?.label||e})}},{title:e(`system.system.dict.item.isDefault`),dataIndex:`is_default`,valueType:`select`,colProps:{span:12},initialValue:0,rules:[{required:!0,message:e(`system.system.dict.item.isDefault.required`)}],fieldProps:{options:[{label:e(`system.system.dict.item.isDefault.yes`),value:1},{label:e(`system.system.dict.item.isDefault.no`),value:0}]},render:t=>t===1?(0,y.jsx)(p,{color:`blue`,children:e(`system.system.dict.item.isDefault.yes`)}):e(`system.system.dict.item.isDefault.no`)},{title:e(`system.system.dict.item.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,initialValue:0,fieldProps:{min:0,style:{width:`100%`}}},{title:e(`system.system.dict.item.status`),dataIndex:`status`,valueType:`select`,colProps:{span:12},initialValue:0,rules:[{required:!0,message:e(`system.system.dict.item.status.required`)}],fieldProps:{options:[{label:e(`system.system.dict.item.status.normal`),value:0},{label:e(`system.system.dict.item.status.disabled`),value:1}]},render:t=>t===0?(0,y.jsx)(l,{status:`success`,text:e(`system.system.dict.item.status.normal`)}):(0,y.jsx)(l,{status:`error`,text:e(`system.system.dict.item.status.disabled`)})},{title:e(`system.system.dict.item.createTime`),dataIndex:`created_at`,render:e=>e?(0,v.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}];return S.id?(0,y.jsxs)(o,{orientation:`vertical`,style:{width:`100%`},children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(s,{type:`link`,onClick:()=>{t(`/system/dict`)},icon:(0,y.jsx)(c,{}),classNames:{root:`p-0 mb-2`},children:e(`system.dict.backToList`)}),(0,y.jsxs)(a.Title,{level:3,children:[(0,y.jsxs)(`span`,{className:`mr-2`,children:[e(`system.dict.itemManagement`),` - `,S.name]}),(0,y.jsx)(a.Text,{type:`secondary`,children:S.code})]})]}),(0,y.jsx)(h,{api:`/system/dict/item`,columns:w,rowKey:`id`,accessName:`system.dict.item`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:[30,0]}},modalProps:{width:600},requestParams:e=>({...e,dict_id:S.id}),searchShow:!1,handleFinish:async(t,n,r,i)=>(n===`create`?(await d(`/system/dict/item`,{...t,dict_id:S.id}),window.$message?.success(e(`system.dict.item.createSuccess`))):(await f(`/system/dict/item/`+i?.id,{...t,dict_id:S.id}),window.$message?.success(e(`system.dict.item.updateSuccess`))),!0)})]}):(0,y.jsx)(`div`,{style:{padding:50,textAlign:`center`},children:(0,y.jsx)(`div`,{style:{marginTop:50,color:`#999`},children:e(`system.dict.selectDictFirst`)})})}export{b as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{o as r,s as i}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as a}from"./typography-C81dpVAv.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./LeftOutlined-V7kBMNHZ.js";import{t as l}from"./badge-CusEU3o_.js";import{n as u}from"./LockOutlined-CM922FLC.js";import{i as d,s as f}from"./XinForm-D9piiVGF.js";import{t as p}from"./tag-CY8tAhzO.js";import{t as m}from"./useTranslation-C4ZVtLa2.js";import{t as h}from"./XinTable-C5M2dV7B.js";var g=[{label:`默认`,value:`default`},{label:`蓝色`,value:`blue`},{label:`绿色`,value:`green`},{label:`红色`,value:`red`},{label:`橙色`,value:`orange`},{label:`紫色`,value:`purple`},{label:`青色`,value:`cyan`},{label:`金色`,value:`gold`},{label:`绿黄色`,value:`lime`},{label:`极客蓝`,value:`geekblue`},{label:`品红`,value:`magenta`},{label:`火山红`,value:`volcano`}],_=e(t(),1),v=e(u(),1),y=n();function b(){let{t:e}=m(),t=r(),[n]=i(),u=n.get(`dictId`),b=n.get(`dictName`)||``,x=n.get(`dictCode`)||``,[S,C]=(0,_.useState)({id:u?parseInt(u):0,name:decodeURIComponent(b),code:x});(0,_.useEffect)(()=>{u&&C({id:parseInt(u),name:decodeURIComponent(b),code:x})},[u,b,x]);let w=[{title:e(`system.system.dict.item.id`),dataIndex:`id`,hideInForm:!0,width:80,align:`center`},{title:e(`system.system.dict.item.label`),dataIndex:`label`,valueType:`text`,rules:[{required:!0,message:e(`system.system.dict.item.label.required`)}]},{title:e(`system.system.dict.item.value`),dataIndex:`value`,valueType:`text`,rules:[{required:!0,message:e(`system.system.dict.item.value.required`)}]},{title:e(`system.system.dict.item.color`),dataIndex:`color`,valueType:`select`,colProps:{span:12},initialValue:`default`,fieldProps:{options:g.map(e=>({label:(0,y.jsx)(p,{color:e.value,children:e.label}),value:e.value}))},render:e=>{let t=g.find(t=>t.value===e);return(0,y.jsx)(p,{color:e,children:t?.label||e})}},{title:e(`system.system.dict.item.isDefault`),dataIndex:`is_default`,valueType:`select`,colProps:{span:12},initialValue:0,rules:[{required:!0,message:e(`system.system.dict.item.isDefault.required`)}],fieldProps:{options:[{label:e(`system.system.dict.item.isDefault.yes`),value:1},{label:e(`system.system.dict.item.isDefault.no`),value:0}]},render:t=>t===1?(0,y.jsx)(p,{color:`blue`,children:e(`system.system.dict.item.isDefault.yes`)}):e(`system.system.dict.item.isDefault.no`)},{title:e(`system.system.dict.item.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,initialValue:0,fieldProps:{min:0,style:{width:`100%`}}},{title:e(`system.system.dict.item.status`),dataIndex:`status`,valueType:`select`,colProps:{span:12},initialValue:0,rules:[{required:!0,message:e(`system.system.dict.item.status.required`)}],fieldProps:{options:[{label:e(`system.system.dict.item.status.normal`),value:0},{label:e(`system.system.dict.item.status.disabled`),value:1}]},render:t=>t===0?(0,y.jsx)(l,{status:`success`,text:e(`system.system.dict.item.status.normal`)}):(0,y.jsx)(l,{status:`error`,text:e(`system.system.dict.item.status.disabled`)})},{title:e(`system.system.dict.item.createTime`),dataIndex:`created_at`,render:e=>e?(0,v.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}];return S.id?(0,y.jsxs)(o,{orientation:`vertical`,style:{width:`100%`},children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(s,{type:`link`,onClick:()=>{t(`/system/dict`)},icon:(0,y.jsx)(c,{}),classNames:{root:`p-0 mb-2`},children:e(`system.dict.backToList`)}),(0,y.jsxs)(a.Title,{level:3,children:[(0,y.jsxs)(`span`,{className:`mr-2`,children:[e(`system.dict.itemManagement`),` - `,S.name]}),(0,y.jsx)(a.Text,{type:`secondary`,children:S.code})]})]}),(0,y.jsx)(h,{api:`/system/dict/item`,columns:w,rowKey:`id`,accessName:`system.dict.item`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:[30,0]}},modalProps:{width:600},requestParams:e=>({...e,dict_id:S.id}),searchShow:!1,handleFinish:async(t,n,r,i)=>(n===`create`?(await d(`/system/dict/item`,{...t,dict_id:S.id}),window.$message?.success(e(`system.dict.item.createSuccess`))):(await f(`/system/dict/item/`+i?.id,{...t,dict_id:S.id}),window.$message?.success(e(`system.dict.item.updateSuccess`))),!0)})]}):(0,y.jsx)(`div`,{style:{padding:50,textAlign:`center`},children:(0,y.jsx)(`div`,{style:{marginTop:50,color:`#999`},children:e(`system.dict.selectDictFirst`)})})}export{b as default};
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More