|
@@ -434,6 +434,102 @@ class SProjectController extends DooController
|
|
$this->render('s-project-section-files', $this->data, TRUE);
|
|
$this->render('s-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'];
|
|
|
|
+ $allproArray = $this->project->getAll();
|
|
|
|
+ foreach ($allproArray as $kk => $vv) {
|
|
|
|
+ if ($vv['pid'] == $this->params['pid']) {
|
|
|
|
+ $this->data['currproArray'] = $vv;
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['allproArray'][] = $vv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+// 面包屑导航合同
|
|
|
|
+ $conArray = $this->contractact->getAll();
|
|
|
|
+ $measureArray = $this->actmeasure->getRowByPmid($this->params['pmid']);
|
|
|
|
+ if (isset($measureArray['stid'])) {
|
|
|
|
+ foreach ($conArray as $kkk => $vvv) {
|
|
|
|
+ if ($vvv['stid'] == $measureArray['stid']) {
|
|
|
|
+ $this->data['currconArray'] = $vvv;
|
|
|
|
+ } else {
|
|
|
|
+ if ($vvv['pid'] == $this->params['pid'])
|
|
|
|
+ $this->data['allconArray'][] = $vvv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['currconArray'] = $this->data['allconArray'] = NULL;
|
|
|
|
+ }
|
|
|
|
+// 面包屑导航标段
|
|
|
|
+ $this->data['curractmeasureArray'] = NULL;
|
|
|
|
+ $this->data['allactmeasureArray'] = [];
|
|
|
|
+ $actmeasureArray = $this->actmeasure->getAll();
|
|
|
|
+ foreach ($actmeasureArray as $kkkk => $vvvv) {
|
|
|
|
+ if ($vvvv['stid'] == $measureArray['stid']) {
|
|
|
|
+ if (($vvvv['pmid'] == $this->params['pmid'])) {
|
|
|
|
+ $this->data['curractmeasureArray'] = $vvvv;
|
|
|
|
+ } else {
|
|
|
|
+ $this->data['allactmeasureArray'][] = $vvvv;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $totalArchive = $this->itemmeasurenum->getCount($this->params['pmid']);
|
|
|
|
+ if ($totalArchive) {
|
|
|
|
+ $pager = new DooPager(Doo::conf()->APP_URL . 'sproject/' . $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']);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ 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('s-project-section-files-recover', $this->data, TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
?>
|
|
?>
|