Browse Source

RUN rm -rf package-lock.json

dev
wenlele 2 years ago
parent
commit
62ac34644e
  1. 6
      api/app/lib/controllers/means/index.js
  2. 1
      web/Dockerfile
  3. 2
      web/client/src/sections/means/components/fileModal.jsx
  4. 15
      web/client/src/sections/means/containers/projectMeans.jsx

6
api/app/lib/controllers/means/index.js

@ -1,6 +1,7 @@
'use strict';
async function addEditFile (ctx, next) {
let message = '添加文件夹失败'
try {
const models = ctx.fs.dc.models;
const data = ctx.request.body;
@ -14,7 +15,8 @@ async function addEditFile (ctx, next) {
}
})
if (onefind) {
throw '文件夹名称重复'
message = '已有同层级文件夹'
throw message
}
@ -33,7 +35,7 @@ async function addEditFile (ctx, next) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`)
ctx.status = 400;
ctx.body = {
"message": '添加文件夹失败'
"message": message
}
}
}

1
web/Dockerfile

@ -9,6 +9,7 @@ EXPOSE 8080
RUN npm config set registry=http://10.8.30.22:7000
RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json
RUN npm cache clean -f
RUN rm -rf package-lock.json
RUN npm install --registry http://10.8.30.22:7000
RUN npm run build
RUN rm -rf client/src

2
web/client/src/sections/means/components/fileModal.jsx

@ -50,7 +50,7 @@ function FileModal (props) {
<Form.Input
field='fileName'
label='文件夹名称'
rules={[{ required: true, message: "请输入文件夹名称" }]}
rules={[{ required: true, message: "请输入文件夹名称,最多20个字", max: 20 }]}
initValue={editData?.fileName}
/>

15
web/client/src/sections/means/containers/projectMeans.jsx

@ -196,11 +196,6 @@ const Rest = (props) => {
<Button theme='borderless' type='primary' style={{ marginRight: 8 }} ><a href={`/_file-server/${r.url + '?filename=' + encodeURIComponent(r.name)}`}>
下载
</a></Button>
<Button theme='borderless' type='primary' style={{ marginRight: 8 }} onClick={() => {
preview(r.url)
}}>
预览
</Button>
<Popconfirm
title="是否确认删除文件?"
// content=""
@ -215,6 +210,16 @@ const Rest = (props) => {
>
<Button theme='borderless' type='danger' >删除</Button>
</Popconfirm>
{(r.url?.indexOf("txt") !== -1 || r.url?.indexOf("rar") !== -1 || r.url?.indexOf("zip") !== -1) ? ""
: <Button theme='borderless' type='primary' style={{ marginRight: 8 }} onClick={() => {
preview(r.url)
}}>
预览
</Button>
}
</div>
}

Loading…
Cancel
Save