123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- /**
- * 版本管理路由
- *
- * @author CaiAoLin
- * @date 2017/7/28
- * @version
- */
- import Express from "express";
- import CompilationController from "../controllers/compilation_controller";
- const router = Express.Router();
- const compilationController = new CompilationController();
- module.exports = function (app) {
- // action定义区域
- router.get(
- "/",
- compilationController.auth,
- compilationController.init,
- compilationController.index
- );
- router.get(
- "/valuation/:section/:id",
- compilationController.auth,
- compilationController.init,
- compilationController.editValuation
- );
- router.get(
- "/:section/:id/:engineerID",
- compilationController.auth,
- compilationController.init,
- compilationController.editEngineering
- );
- router.get(
- "/valuation/:section/delete/:id",
- compilationController.auth,
- compilationController.init,
- compilationController.deleteValuation
- );
- router.get(
- "/template/:section/:id/:engineering",
- compilationController.auth,
- compilationController.init,
- compilationController.billsTemplate
- );
- router.post(
- "/release",
- compilationController.auth,
- compilationController.init,
- compilationController.release
- );
- router.post(
- "/add",
- compilationController.auth,
- compilationController.init,
- compilationController.addCompilation
- );
- router.post(
- "/setDescription",
- compilationController.auth,
- compilationController.init,
- compilationController.setDescription
- );
- router.post(
- "/setEdition",
- compilationController.auth,
- compilationController.init,
- compilationController.setEdition
- );
- router.post(
- "/setSerialNumber",
- compilationController.auth,
- compilationController.init,
- compilationController.setSerialNumber
- );
- router.post(
- "/setOverWriteUrl",
- compilationController.auth,
- compilationController.init,
- compilationController.setOverWriteUrl
- );
- router.post(
- "/setExample",
- compilationController.auth,
- compilationController.init,
- compilationController.setExample
- );
- router.post(
- "/add-valuation",
- compilationController.auth,
- compilationController.init,
- compilationController.addValuation
- );
- router.post(
- "/save-valuation",
- compilationController.auth,
- compilationController.init,
- compilationController.saveValuation
- );
- router.post(
- "/update-engineer",
- compilationController.auth,
- compilationController.init,
- compilationController.updateEngineer
- );
- router.post(
- "/delete-engineer",
- compilationController.auth,
- compilationController.init,
- compilationController.deleteEngineer
- );
- router.post(
- "/copy-engineer",
- compilationController.auth,
- compilationController.init,
- compilationController.copyEngineer
- );
- router.post(
- "/save-lib",
- compilationController.auth,
- compilationController.init,
- compilationController.saveEngineering
- );
- router.post(
- "/valuation/:section/enable",
- compilationController.auth,
- compilationController.init,
- compilationController.enableSwitch
- );
- router.post(
- "/valuation/:section/fileTypes",
- compilationController.auth,
- compilationController.init,
- compilationController.setFileTypes
- );
- router.post(
- "/template/:section/:id/:engineering/update",
- compilationController.auth,
- compilationController.init,
- compilationController.updateBillsTemplate
- );
- router.post(
- "/addEngineer",
- compilationController.auth,
- compilationController.init,
- compilationController.addEngineer
- );
- router.post(
- "/copyRationLibs",
- compilationController.auth,
- compilationController.init,
- compilationController.copyRationLibs
- );
- router.post(
- "/copyValuation",
- compilationController.auth,
- compilationController.init,
- compilationController.copyValuation
- );
- router.post(
- "/changeCategory",
- compilationController.auth,
- compilationController.init,
- compilationController.changeCategory
- );
- router.post(
- "/changeLocation",
- compilationController.auth,
- compilationController.init,
- compilationController.changeLocation
- );
- router.post(
- "/changeFreeUse",
- compilationController.auth,
- compilationController.init,
- compilationController.changeFreeUse
- );
- router.post(
- "/changeCompilation",
- compilationController.auth,
- compilationController.init,
- compilationController.changeCompilation
- );
- app.use("/compilation", router);
- };
|