|
@@ -10,6 +10,7 @@ Doo::loadClass('measureauditact');
|
|
|
Doo::loadClass('itemmeasurenum');
|
|
|
Doo::loadClass('itemfile');
|
|
|
Doo::loadClass('attachment');
|
|
|
+Doo::loadHelper('DooPager');
|
|
|
|
|
|
/* * proDetail
|
|
|
* MainController
|
|
@@ -383,7 +384,7 @@ class ProjectController extends DooController
|
|
|
if (isset($_POST['optype']) && ($_POST['optype'] == 'del') && isset($_POST['imnid'])) {
|
|
|
$imnidArray = $this->itemmeasurenum->getRowData($_POST['imnid']);
|
|
|
if ($imnidArray['iaid'] > 0) {
|
|
|
- $this->itemmeasurenum->updateDeltag($_POST['imnid']);
|
|
|
+ $this->itemmeasurenum->updateDeltag($_POST['imnid'], $this->auth->getUid());
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
die();
|
|
|
}
|
|
@@ -399,6 +400,7 @@ class ProjectController extends DooController
|
|
|
die();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
// 面包屑导航项目
|
|
|
$this->data['currproArray'] = $this->data['allproArray'] = NULL;
|
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
@@ -438,7 +440,36 @@ class ProjectController extends DooController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $this->data['itemMeasureArray'] = $this->itemmeasurenum->getItemMeasureNum($this->params['pmid']);
|
|
|
+ // 选取查询
|
|
|
+ $groupArray = $this->numofperact->getGroupByLastOne2($this->params['pmid']);
|
|
|
+ $this->data['groupArray'] = $groupArray;
|
|
|
+ $owneridArray = $this->itemfle->getGroupOwnerid($this->params['pmid']);
|
|
|
+ foreach ($owneridArray as $k => $v) {
|
|
|
+ $this->data['owneridArray'][$k]['name'] = $this->profile->getProWithUid($v['ownerid'])['name'];
|
|
|
+ $this->data['owneridArray'][$k]['iaid'] = $v['iaid'];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+// 分页
|
|
|
+ $totalArchive = $this->itemmeasurenum->getCount($this->params['pmid'], 0, $this->params['numpname'], $this->params['userid']);
|
|
|
+ if ($totalArchive) {
|
|
|
+ if ($this->params['numpname'] && $this->params['userid']) {
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'project/' . $this->params['pmid'] . '/section/' . $this->params['pmid'] . '/files/num/' . $this->params['numpname'] . '/user/' . $this->params['userid'] . '/page', $totalArchive, 30, 100);
|
|
|
+ } elseif ($this->params['numpname']) {
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'project/' . $this->params['pmid'] . '/section/' . $this->params['pmid'] . '/files/num/' . $this->params['numpname'] . '/page', $totalArchive, 30, 100);
|
|
|
+ } elseif ($this->params['userid']) {
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'project/' . $this->params['pmid'] . '/section/' . $this->params['pmid'] . '/files/user/' . $this->params['userid'] . '/page', $totalArchive, 30, 100);
|
|
|
+ } else {
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'project/' . $this->params['pmid'] . '/section/' . $this->params['pmid'] . '/files/page', $totalArchive, 30, 100);
|
|
|
+ }
|
|
|
+ $pager->setCss('', 'disabled', 'active');
|
|
|
+ if (isset($this->params['pindex']))
|
|
|
+ $pager->paginate(intval($this->params['pindex']));
|
|
|
+ else
|
|
|
+ $pager->paginate(1);
|
|
|
+ $this->data['itemMeasureArray'] = $this->itemmeasurenum->getItemMeasureNum($this->params['pmid'], $pager->limit, $this->params['numpname'], $this->params['userid']);
|
|
|
+ }
|
|
|
+
|
|
|
foreach ($this->data['itemMeasureArray'] as $k => $v) {
|
|
|
$fileArray = $this->itemfle->getItemFile($v['iaid']);
|
|
|
$this->data['itemMeasureArray'][$k]['realname'] = $this->profile->getProWithUid($v['ownerid'])['name'];
|
|
@@ -450,11 +481,39 @@ class ProjectController extends DooController
|
|
|
$this->data['pid'] = $this->params['pid'];
|
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
|
$this->data['mpid'] = $this->params['mpid'];
|
|
|
+ $this->data['user'] = $this->params['userid'];
|
|
|
+ $this->data['num'] = $this->params['numpname'];
|
|
|
+ $this->data['pager'] = $pager->output;
|
|
|
$this->render('w-project-section-files', $this->data, TRUE);
|
|
|
}
|
|
|
|
|
|
function proSectionFilesRecover()
|
|
|
{
|
|
|
+ if (isset($_POST['optype']) && ($_POST['optype'] == 'reconvery') && isset($_POST['imnid'])) {
|
|
|
+ $imnidArray = $this->itemmeasurenum->getRowData($_POST['imnid']);
|
|
|
+ if ($imnidArray['iaid'] > 0) {
|
|
|
+ $this->itemmeasurenum->recoveryDel($_POST['imnid']);
|
|
|
+ echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
+ die();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (isset($_POST['optype']) && ($_POST['optype'] == 'del') && isset($_POST['imnid'])) {
|
|
|
+ $imnidArray = $this->itemmeasurenum->getRowData($_POST['imnid']);
|
|
|
+ if ($imnidArray['iaid'] > 0) {
|
|
|
+ $iaidArray = $this->itemfle->getItemFile($imnidArray['iaid']);
|
|
|
+ if ($iaidArray['ownerid'] == $this->auth->getUid()) {
|
|
|
+ $this->itemfle->delItem($imnidArray['iaid']);
|
|
|
+ $this->itemmeasurenum->delItemIAID($imnidArray['iaid']);
|
|
|
+ echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
|
+ die();
|
|
|
+ } else {
|
|
|
+ echo json_encode(array('status' => 2), JSON_UNESCAPED_UNICODE);
|
|
|
+ die();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 面包屑导航项目
|
|
|
$this->data['currproArray'] = $this->data['allproArray'] = NULL;
|
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
@@ -494,23 +553,33 @@ class ProjectController extends DooController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $this->data['itematta'] = $this->itemfle->getFilesAll($this->params['pmid']);
|
|
|
- foreach ($this->data['itematta'] as $k => $v) {
|
|
|
- $this->data['itematta'][$k]['realname'] = $this->profile->getProWithUid($v['ownerid'])['name'];
|
|
|
- $this->data['itematta'][$k]['pmname'] = $this->actmeasure->getRowByPmid($v['pmid'])['pmname'];
|
|
|
+
|
|
|
+ $totalArchive = $this->itemmeasurenum->getCount($this->params['pmid']);
|
|
|
+ if ($totalArchive) {
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'project/' . $this->params['pmid'] . '/section/' . $this->params['pmid'] . '/files/recover/page', $totalArchive, 1, 1);
|
|
|
+ $pager->setCss('', 'disabled', 'active');
|
|
|
+ if (isset($this->params['pindex']))
|
|
|
+ $pager->paginate(intval($this->params['pindex']));
|
|
|
+ else
|
|
|
+ $pager->paginate(1);
|
|
|
+ $this->data['itemMeasureArray'] = $this->itemmeasurenum->getItemMeasureNumDel($pager->limit, $this->params['pmid']);
|
|
|
}
|
|
|
- $this->data['itemMeasureArray'] = $this->itemmeasurenum->getItemMeasureNum($this->params['pmid']);
|
|
|
+
|
|
|
+
|
|
|
foreach ($this->data['itemMeasureArray'] as $k => $v) {
|
|
|
$fileArray = $this->itemfle->getItemFile($v['iaid']);
|
|
|
$this->data['itemMeasureArray'][$k]['realname'] = $this->profile->getProWithUid($v['ownerid'])['name'];
|
|
|
+ $this->data['itemMeasureArray'][$k]['delname'] = $this->profile->getProWithUid($v['deluid'])['name'];
|
|
|
$this->data['itemMeasureArray'][$k]['pmname'] = $this->actmeasure->getRowByPmid($v['pmid'])['pmname'];
|
|
|
$this->data['itemMeasureArray'][$k]['filename'] = $fileArray['filename'];
|
|
|
$this->data['itemMeasureArray'][$k]['fileext'] = $fileArray['fileext'];
|
|
|
$this->data['itemMeasureArray'][$k]['tips'] = $v['tips'];
|
|
|
+ $this->data['itemMeasureArray'][$k]['filepath'] = $fileArray['filepath'];
|
|
|
}
|
|
|
$this->data['pid'] = $this->params['pid'];
|
|
|
$this->data['pmid'] = $this->params['pmid'];
|
|
|
$this->data['mpid'] = $this->params['mpid'];
|
|
|
+ $this->data['pager'] = $pager->output;
|
|
|
$this->render('w-project-section-files-recover', $this->data, TRUE);
|
|
|
}
|
|
|
|
|
@@ -520,9 +589,15 @@ class ProjectController extends DooController
|
|
|
$iaidArray = $this->itemfle->getItemFile($this->params['iaid']);
|
|
|
if ($iaidArray['oldiaid'] > 0) {
|
|
|
$oldiaidArray = $this->itemfle->getFileHistory($iaidArray['oldiaid']);
|
|
|
+ $htmlstr = '';
|
|
|
foreach ($oldiaidArray as $k => $v) {
|
|
|
- $htmlstr = '<div class="media"><div class="pull-left"><h4>#1</h4></div><div class="media-body"><h5>陈特 上传于 2016-10-10 10:10</h5><a href="#" target="_blank">QQ截图20160629164352.png</a></div></div>';
|
|
|
+ $countInt = $k + 1;
|
|
|
+ $formatDate = date('Y-m-d H:i:s', $v['intime']);
|
|
|
+ $profileArray = $this->profile->getProWithUid($v['ownerid']);
|
|
|
+ $htmlstr .= '<div class="media"><div class="pull-left"><h4>#' . $countInt . '</h4></div><div class="media-body"><h5>' . $profileArray['name'] . ' 上传于 ' . $formatDate . '</h5><a href="/' . $v['filepath'] . '" target="_blank">' . $v['filename'] . '</a></div></div>';
|
|
|
}
|
|
|
+ echo json_encode(array('html' => $htmlstr), JSON_UNESCAPED_UNICODE);
|
|
|
+ die();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -732,6 +807,7 @@ class ProjectController extends DooController
|
|
|
$this->att->setUploadDir();
|
|
|
return $this->att->uploadMut($fildname, $param);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
?>
|