* [task#131112,doing,0.5h] add export case method.

This commit is contained in:
tianshujie
2024-10-23 16:25:31 +08:00
committed by 刘梦艺
parent 5563d55a27
commit 15839752f3
+23
View File
@@ -507,4 +507,27 @@ class caselib extends control
$this->view->dataInsert = $insert;
$this->display();
}
/**
* 导出用例。
* Export case.
*
* @param int $libID
* @param string $orderBy
* @param string $browseType
* @access public
* @return void
*/
public function exportCase(int $libID, string $orderBy = 'id_desc', string $browseType = 'all')
{
$lib = $this->caselib->getById($libID);
$fileName = $this->lang->testcase->common;
$browseType = isset($this->lang->caselib->featureBar['browse'][$browseType]) ? $this->lang->caselib->featureBar['browse'][$browseType] : '';
$this->view->fileName = $lib->name . $this->lang->dash . $browseType . $fileName;
$this->view->allExportFields = $this->config->caselib->exportFields;
$this->view->customExport = true;
$this->display();
}
}