|
|
|
@ -1,4 +1,6 @@ |
|
|
|
|
var mock=require('../../public/javascripts/mock') |
|
|
|
|
const multipart = require("connect-multiparty"); |
|
|
|
|
var multipartMiddleware = multipart(); |
|
|
|
|
module.exports= { |
|
|
|
|
//**通用右键菜单接口
|
|
|
|
|
addContextMenu:function (router,prefix, label) |
|
|
|
@ -26,6 +28,10 @@ module.exports= { |
|
|
|
|
router.patch(`/${prefix}/:y/down`, function (req, res, next) { |
|
|
|
|
return res.json(mock.ok(`${label}第${+req.params.y + 1}行跟第${+req.params.y + 2}行交换位置`)) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
router.put(`/${prefix}/:y/:column`, multipartMiddleware,function (req, res, next) { |
|
|
|
|
return res.json(mock.ok(`${label}第${+req.params.y + 1}行${label}:列${req.params.column}更新值:${req.body.value}成功`)) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|