* Modify format and design delete issues.

This commit is contained in:
tianshujie98
2020-09-02 08:57:18 +08:00
parent f88cccac65
commit 94ca22e92c
2 changed files with 21 additions and 22 deletions
+1 -3
View File
@@ -64,7 +64,7 @@ CREATE TABLE `zt_design` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`program` varchar(255) NOT NULL,
`product` varchar(255) NOT NULL,
`commit` varchar(30) NOT NULL,
`commit` text NOT NULL,
`project` mediumint(9) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`parent` mediumint(8) unsigned NOT NULL,
@@ -298,5 +298,3 @@ ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `modul
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('1', '0', '*', '*', '*', 'moduleName=weekly&methodName=computeWeekly', '更新项目周报', 'system', 0, 'normal', '2020-08-27 10:07:53');
ALTER TABLE `zt_story` ADD `storyChanged` enum('0','1') NOT NULL DEFAULT '0' AFTER `version`;
ALTER TABLE `zt_design` MODIFY `commit` text;
+20 -19
View File
@@ -89,11 +89,11 @@ class design extends control
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->create;
$this->view->position[] = $this->lang->design->create;
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
$this->view->products = $this->loadModel('product')->getPairs('', $this->session->program);
$this->view->productID = $productID;
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productID);
$this->view->products = $this->loadModel('product')->getPairs('', $this->session->program);
$this->view->productID = $productID;
$this->view->program = $this->loadModel('project')->getByID($this->session->program);
$this->display();
}
@@ -149,10 +149,10 @@ class design extends control
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
$this->view->position[] = $this->lang->design->view;
$this->view->design = $design;
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList('design', $design->id);
$this->view->design = $design;
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($design->product);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList('design', $design->id);
$this->display();
}
@@ -194,7 +194,6 @@ class design extends control
}
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->edit;
$this->view->position[] = $this->lang->design->view;
$this->view->position[] = $this->lang->design->edit;
$this->view->design = $design;
@@ -261,15 +260,15 @@ class design extends control
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->linkCommit;
$this->view->position[] = $this->lang->design->linkCommit;
$this->view->repos = $repos;
$this->view->repoID = $repoID;
$this->view->repo = $repo;
$this->view->revisions = empty($revisions) ? $revisions : $revisions[$pageID - 1];;
$this->view->designID = $designID;
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->design = $this->design->getByID($designID);
$this->view->pager = $pager;
$this->view->repos = $repos;
$this->view->repoID = $repoID;
$this->view->repo = $repo;
$this->view->revisions = empty($revisions) ? $revisions : $revisions[$pageID - 1];;
$this->view->designID = $designID;
$this->view->begin = $begin;
$this->view->end = $end;
$this->view->design = $this->design->getByID($designID);
$this->view->pager = $pager;
$this->display();
}
@@ -352,6 +351,8 @@ class design extends control
else
{
$this->design->delete(TABLE_DESIGN, $designID);
$this->dao->delete()->from(TABLE_RELATION)->where('Atype')->eq('design')->andWhere('AID')->eq($designID)->andWhere('Btype')->eq('commit')->andwhere('relation')->eq('completedin')->exec();
$this->dao->delete()->from(TABLE_RELATION)->where('Atype')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('Btype')->eq('design')->andwhere('relation')->eq('completedfrom')->exec();
die(js::locate($this->session->designList, 'parent'));
}
}