import axios from "@/assets/axios";
|
|
/**
|
* 查询所有的软件 列表
|
* @returns
|
*/
|
export const getList = (pageCurr, pageSize, data) => {
|
return axios({
|
method: "GET",
|
url: "software/getAllSoftware",
|
params: { pageCurr, pageSize, ...data }
|
})
|
}
|
/**
|
* 产品软件审批提交
|
* @returns
|
*/
|
// export const productSoftwareSubmit = (data) => {
|
// return axios({
|
// method: "POST",
|
// url: "worksheetMain/productSoftwareSubmit",
|
// headers: {
|
// "Content-Type": "multipart/form-data"
|
// },
|
// data
|
// })
|
// }
|
/**
|
* 软件下载
|
* @returns
|
*/
|
export const downLoadSoftware = (id) => {
|
return axios({
|
method: "GET",
|
url: "software/downLoadSoftware",
|
responseType: "blob",
|
params: {
|
id
|
}
|
})
|
}
|
/**
|
* 软件说明文档解析
|
* @returns
|
*/
|
export const excelParse = (data) => {
|
return axios({
|
method: "POST",
|
url: "software/excelParse",
|
headers: {
|
"Content-Type": "multipart/form-data"
|
},
|
data
|
})
|
}
|
/**
|
* 软件上传
|
* @returns
|
*/
|
export const productSoftwareSubmit = (data) => {
|
return axios({
|
method: "POST",
|
url: "software/upload",
|
headers: {
|
"Content-Type": "multipart/form-data"
|
},
|
data
|
})
|
}
|
|
/**
|
*
|
* @returns
|
*/
|
export const applyModel = (data) => {
|
return axios({
|
method: "PUT",
|
url: "software/applyModel",
|
data
|
})
|
}
|
/**
|
* 软件锁定
|
* @returns
|
*/
|
export const updateSoftwareLock = (params) => {
|
return axios({
|
method: "GET",
|
url: "software/updateSoftwareLock",
|
params
|
})
|
}
|
|
/**
|
* 删除指定的软件
|
* @return {AxiosPromise}
|
* @param fileName 文件名称
|
* @param version 文件版本
|
*/
|
export const deleteSoftwareApi = (fileName, version)=>{
|
return axios({
|
method: "GET",
|
url: "software/deleteSoftware",
|
params: {
|
fileName,
|
version
|
}
|
})
|
}
|
|
/**
|
* 根据软件名称 下载源码
|
* fileName
|
*/
|
export const downLoadCode = (fileName) => {
|
return axios({
|
method: "GET",
|
url: "softcode/downLoadCode",
|
responseType: "blob",
|
params: {
|
fileName
|
}
|
})
|
}
|
|
/**
|
* 查询日期三天内的所有上传软件名称
|
* createTime 上传日期
|
*/
|
export const getFileNameByCreateTime = (createTime) => {
|
return axios({
|
method: "GET",
|
url: "softcode/getFileNameByCreateTime",
|
params: {
|
createTime
|
}
|
})
|
}
|
/**
|
* 按软件负责人查询 他的未上传源码的所有软件 记录
|
*/
|
export const getFileNameByOwner = (owner) => {
|
return axios({
|
method: "GET",
|
url: "softcode/getFileNameByOwnerWithCode",
|
params: {
|
owner
|
}
|
})
|
}
|
|
/**
|
* 源码包上传
|
* file
|
* fileNames
|
*/
|
export const uploadCode = (data) => {
|
return axios({
|
method: "POST",
|
url: "softcode/uploadCode",
|
headers: {
|
"Content-Type": "multipart/form-data"
|
},
|
data
|
})
|
}
|
|
/**
|
* 共享源码包
|
*/
|
export const connectCode = (num, fileNames) => {
|
return axios({
|
method: "POST",
|
url: "softcode/setCodeByFileNmaes",
|
data: {
|
num,
|
fileNames
|
}
|
})
|
}
|