Merge branch '20.x' of github.com:easysoft/zentaopms into 20.x

This commit is contained in:
z
2020-08-26 10:31:01 +08:00
4 changed files with 33 additions and 4 deletions

View File

@@ -15,6 +15,9 @@ class risk extends control
*/
public function browse($browseType = 'all', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
$uri = $this->app->getURI(true);
$this->session->set('riskList', $uri);
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
/* Build the search form. */
$actionURL = $this->createLink('risk', 'browse', "browseType=bysearch&queryID=myQueryID");

26
module/risk/js/common.js Normal file
View File

@@ -0,0 +1,26 @@
$(function()
{
$('#riskindex').attr('readonly', true);
$('#pri').attr('disabled', true);
computeIndex();
function computeIndex()
{
var impact = $('#impact').val();
var probability = $('#probability').val();
var riskindex = parseInt(impact * probability);
var pri = '';
if(0 < riskindex && riskindex <= 5) pri = 'low';
if(5 < riskindex && riskindex <= 12) pri = 'middle';
if(15 <= riskindex && riskindex <= 25) pri = 'high';
$('#riskindex').val(riskindex);
$('#pri').val(pri);
$('#pri').trigger("chosen:updated")
$('#pri').chosen();
$('#pri').attr('disabled', true);
$('input[name="pri"]').remove();
$('#pri').after("<input type='hidden' name='pri' value='" + pri + "'/>");
}
$('#impact, #probability').change(function(){computeIndex()});
})

View File

@@ -8,7 +8,7 @@
<thead>
<tr>
<th class='w-50px'><?php echo $lang->risk->id;?></th>
<th><?php echo $lang->risk->name;?></th>
<th class='required'><?php echo $lang->risk->name;?></th>
<th class='w-200px'><?php echo $lang->risk->source;?></th>
<th class='w-200px'><?php echo $lang->risk->category;?></th>
<th class='w-200px'><?php echo $lang->risk->strategy;?></th>

View File

@@ -78,7 +78,7 @@
</tr>
<tr>
<th><?php echo $lang->risk->strategy;?></th>
<td><?php echo zget($lang->risk->strategy, $risk->strategy);?></td>
<td><?php echo zget($lang->risk->strategyList, $risk->strategy);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->status;?></th>
@@ -86,11 +86,11 @@
</tr>
<tr>
<th><?php echo $lang->risk->impact;?></th>
<td><?php echo zget($lang->risk->impact, $risk->impact);?></td>
<td><?php echo zget($lang->risk->impactList, $risk->impact);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->probability;?></th>
<td><?php echo zget($lang->risk->probability, $risk->probability);?></td>
<td><?php echo zget($lang->risk->probabilityList, $risk->probability);?></td>
</tr>
<tr>
<th><?php echo $lang->risk->riskindex;?></th>