first commit

This commit is contained in:
sxu 2024-11-12 09:21:04 +08:00
commit 330d8eadc5
797 changed files with 90500 additions and 0 deletions

7
.env.development Normal file
View File

@ -0,0 +1,7 @@
# 开发环境配置
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'

5
.env.production Normal file
View File

@ -0,0 +1,5 @@
# 生产环境配置
ENV = 'production'
# 若依管理系统/生产环境
VUE_APP_BASE_API = '/dev-api'

26
.gitignore vendored Normal file
View File

@ -0,0 +1,26 @@
.DS_Store
node_modules/
unpackage/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

20
.hbuilderx/launch.json Normal file
View File

@ -0,0 +1,20 @@
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-android"
}
]
}

25
App.vue Normal file
View File

@ -0,0 +1,25 @@
<script>
import store from "./store/user";
export default {
onLaunch: function () {
// app
plus.screen.lockOrientation("portrait-primary");
console.log("App Launch");
console.log(process.env.NODE_ENV, "当前运行环境····");
},
onShow: async function () {
console.log("App Show");
const { data: res } = await this.$api.index.getUserInfo();
store.commit("SET_PERMISSIONS", res.permissions);
},
onHide: function () {
console.log("App Hide");
},
};
</script>
<style lang="scss">
/*每个页面公共css */
@import "@/uni_modules/uview-ui/index.scss";
</style>

845
apis/apis.js Normal file
View File

@ -0,0 +1,845 @@
import Http from "./request";
import HttpConfig from "./http";
const login = {
async codeLogin(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.code,
data,
header
);
},
async getMessageCode(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.code,
data,
header
);
},
async checkCode(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.checkCode,
data,
header
);
},
async log(data = {}, header = {}) {
return await Http.post(
HttpConfig.authPath,
HttpConfig.serviceUrl.login.log,
data,
header
);
},
};
const user = {
async logOut(data = {}, header = {}) {
return await Http.delete(
HttpConfig.authPath,
HttpConfig.serviceUrl.user.logOut,
data,
header
);
},
};
const index = {
async noticeCont(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.noticeCont,
data,
header
);
},
async singleNotice(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.singleNotice,
data,
header
);
},
async waitDo(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.waitDo,
data,
header
);
},
async keyData(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.index.keyData,
data,
header
);
},
async getUserInfo(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.getUserInfo,
data,
header
);
},
async fetchCompanyName(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.index.fetchCompanyName,
data,
header
);
},
};
const fetchMaterial = {
async fetchMaterialList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.fetchMaterialList,
data,
header
);
},
async getDeptList(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.fetchMaterial.getDeptList,
data,
header
);
},
async getProjList(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.fetchMaterial.getProjList,
data,
header
);
},
async subCart(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.subCart,
data,
header
);
},
async getDeviceDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.getDeviceDetail,
data,
header
);
},
async addItemToCart(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.addItemToCart,
data,
header
);
},
async delCart(data = {}, header = {}) {
return await Http.delete(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.delCart,
data,
header
);
},
async getCartDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.getCartDetail,
data,
header
);
},
async itemNumChange(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterial.itemNumChange,
data,
header
);
},
};
const fetchExam = {
async fetchExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchExamList,
data,
header
);
},
async subExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.subExam,
data,
header
);
},
async subExamCq(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.subExamCq,
data,
header
);
},
async rejectExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.rejectExam,
data,
header
);
},
async rejectExamCq(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.rejectExamCq,
data,
header
);
},
async fetchExamListAll(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchExamListAll,
data,
header
);
},
async fetchTrueExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchTrueExamList,
data,
header
);
},
async fetchTrueExamListCq(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchTrueExamListCq,
data,
header
);
},
async fetchDetailList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchExam.fetchDetailList,
data,
header
);
},
};
const newInStore = {
async fetchNewInStoreList(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.newInStore.fetchNewInStoreList,
data,
header
);
},
async fetchNewBuyDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.newInStore.fetchNewBuyDetail,
data,
header
);
},
async subNewBuy(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.newInStore.subNewBuy,
data,
header
);
},
};
const fetchMaterialOutStore = {
async fetchInfoByCode(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByCode,
data,
header
);
},
async subOutStore(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.subOutStore,
data,
header
);
},
async subOutStoreArr(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.subOutStoreArr,
data,
header
);
},
async fetchInfoByQrCode(data = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchInfoByQrCode,
data
);
},
async fetchSingleDetail(data = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.fetchSingleDetail,
data
);
},
async searchRfid(data = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fetchMaterialOutStore.searchRfid,
data
);
},
};
const exitMaterial = {
async exitDeptList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitDeptList,
data,
header
);
},
async exitMaterialList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialList,
data,
header
);
},
async exitMaterialDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.exitMaterialDetail,
data,
header
);
},
async subExitMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.subExitMaterial,
data,
header
);
},
async delMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.delMaterial,
data,
header
);
},
async newExitList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.newExitList,
data,
header
);
},
async selectMaterial(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitMaterial.selectMaterial,
data,
header
);
},
async ifAgreement(data = {}, header = {}) {
return await Http.post(
HttpConfig.systemPath,
HttpConfig.serviceUrl.exitMaterial.ifAgreement,
data,
header
);
},
async ifAgreementNew(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.exitMaterial.ifAgreement,
data,
header
);
},
};
const exitExam = {
async exitExamList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamList,
data,
header
);
},
async exitExamDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.exitExamDetail,
data,
header
);
},
async subExitExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.subExitExam,
data,
header
);
},
async rejectExitExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.exitExam.rejectExitExam,
data,
header
);
},
};
const fix = {
async fixList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixList,
data,
header
);
},
async fixDetail(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixDetail,
data,
header
);
},
async fixExam(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixExam,
data,
header
);
},
async completeFix(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.completeFix,
data,
header
);
},
async submitFix(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.submitFix,
data,
header
);
},
async fixCrew(data = {}, header = {}) {
return await Http.get(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fix.fixCrew,
data,
header
);
},
async maList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.maList,
data,
header
);
},
async fixFactory(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.fix.fixFactory,
data,
header
);
},
async uploadPic(data = {}, header = {}) {
return await Http.upload(
HttpConfig.systemPath,
HttpConfig.serviceUrl.fix.uploadPic,
data,
header
);
},
};
const repairTestInStore = {
async repairTestInStoreList(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreList,
data,
header
);
},
async repairTestInStoreDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.repairTestInStoreDetail,
data,
header
);
},
async processOrReject(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.repairTestInStore.processOrReject,
data,
header
);
},
};
const backMaterialReceive = {
async backMaterialReceiveList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveList,
data,
header
);
},
async backMaterialReceiveDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialReceiveDetail,
data,
header
);
},
async backMaterialSetNumBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetNumBack,
data,
header
);
},
async backMaterialQrcodeQuery(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialQrcodeQuery,
data,
header
);
},
async backMaterialSetCodeBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backMaterialSetCodeBack,
data,
header
);
},
async backReceiveCodeQuery(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveCodeQuery,
data,
header
);
},
async backReceiveEndBack(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.backReceiveEndBack,
data,
header
);
},
async seeBackMaterialDetail(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.seeBackMaterialDetail,
data,
header
);
},
async searchRfid(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.searchRfid,
data,
header
);
},
async subRfid(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.subRfid,
data,
header
);
},
// fetchMaterialOutStore
async searchByCode(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.searchByCode,
data,
header
);
},
// fetchMaterialOutStore
async searchCodeDevice(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.searchCodeDevice,
data,
header
);
},
// fetchMaterialOutStore
async returnGetRecord(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.backMaterialReceive.returnGetRecord,
data,
header
);
},
};
const crashExam = {
async crashExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.crashExam.crashExamList,
data,
header
);
},
async crashExamDetails(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.crashExam.crashExamDetails,
data,
header
);
},
async crashExamAudit(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.crashExam.crashExamAudit,
data,
header
);
},
};
const testExam = {
async testExamList(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.testExam.testExamList,
data,
header
);
},
async testExamDetails(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.testExam.testExamDetails,
data,
header
);
},
async testExamAudit(data = {}, header = {}) {
return await Http.post(
HttpConfig.materialPath,
HttpConfig.serviceUrl.testExam.testExamAudit,
data,
header
);
},
};
const authManage = {
async fetchAuthList(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.authManage.fetchAuthList,
data,
header
);
},
async fetchIsUsing(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.authManage.fetchIsUsing,
data,
header
);
},
async subAdd(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.authManage.subAdd,
data,
header
);
},
async subDel(data = {}, header = {}) {
return await Http.delete(
HttpConfig.basePath,
HttpConfig.serviceUrl.authManage.subDel,
data,
header
);
},
};
const searchProjUsing = {
async fetchProjUsingList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.searchProjUsing.fetchProjUsingList,
data,
header
);
},
};
const searchFetchRecord = {
async fetchRecordList(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.searchFetchRecord.fetchRecordList,
data,
header
);
},
};
const update = {
async fetchAppVer(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.update.fetchAppVer,
data,
header
);
},
};
const rfidBinding = {
async bindRfid(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.rfidBinding.bindRfid,
data,
header
);
},
};
const qrcodeBinding = {
async bindQrcode(data = {}, header = {}) {
return await Http.post(
HttpConfig.basePath,
HttpConfig.serviceUrl.qrcodeBinding.bindQrcode,
data,
header
);
},
async fetchDeviceType(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.qrcodeBinding.fetchDeviceType,
data,
header
);
},
async fetchDeviceSpec(data = {}, header = {}) {
return await Http.get(
HttpConfig.materialPath,
HttpConfig.serviceUrl.qrcodeBinding.fetchDeviceSpec,
data,
header
);
},
};
const indexScan = {
async infoByCode(data = {}, header = {}) {
return await Http.get(
HttpConfig.basePath,
HttpConfig.serviceUrl.indexScan.infoByCode,
data,
header
);
},
};
const url = HttpConfig.systemPath;
export default {
login,
index,
user,
fetchMaterial,
fetchExam,
newInStore,
fetchMaterialOutStore,
exitMaterial,
fix,
exitExam,
repairTestInStore,
backMaterialReceive,
crashExam,
testExam,
authManage,
searchProjUsing,
searchFetchRecord,
update,
rfidBinding,
qrcodeBinding,
indexScan,
url,
};

191
apis/http.js Normal file
View File

@ -0,0 +1,191 @@
const ENV = process.env.NODE_ENV;
class HttpConfig {
// #ifdef H5
// baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
// baseUrl = "http://112.29.103.165:21624"
// baseUrl = "http://192.168.0.14:21624"
// baseUrl = "http://192.168.0.56:21626"
// baseUrl = "http://192.168.0.14:18866"
// baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.9:8080"
// baseUrl = "http://10.40.92.60:28080"
// baseUrl = "http://10.40.92.138:28080"
// baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.140:28080"
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://192.168.2.160:39080" // 梁超
// baseUrl = "http://192.168.2.218:39080" // 福
target = "http://192.168.2.158:49080"; // 开发阶段后台ip
// #endif
// 基地址 (部署时使用 需要加 dev-api
// authPath = `${this.baseUrl}/dev-api/auth`
// systemPath = `${this.baseUrl}/dev-api/system`
// basePath = `${this.baseUrl}/dev-api/base`
// materialPath = `${this.baseUrl}/dev-api/material`
baseUrl =
ENV === "production"
? "https://test-cc.zhgkxt.com/sgzbgl-api"
: this.target;
authPath =
ENV === "production" ? `${this.baseUrl}/auth` : `${this.baseUrl}/auth`;
systemPath =
ENV === "production"
? `${this.baseUrl}/system`
: `${this.baseUrl}/system`;
basePath =
ENV === "production"
? `${this.baseUrl}/material/base`
: `${this.baseUrl}/material/base`;
materialPath =
ENV === "production"
? `${this.baseUrl}/material`
: `${this.baseUrl}/material`;
// 短链
serviceUrl = {
login: {
code: "/sendCode", // 获取验证码
checkCode: "/checkCode", // 验证码登录
log: "/loginApp", // 账户登录
},
user: {
logOut: "/logout", // 退出登录
},
index: {
noticeCont: "/sysNotice/getList", // 获取公告内容
singleNotice: "/notice/list", // 查看单个公告
waitDo: "/app/getToDoList", // 获取待办事项
keyData: "/app/getCriticalData", // 获取关键数据
getUserInfo: "/user/getInfo", // 获取用户信息
fetchCompanyName: "/dept/getCompanyByAncestors", // 获取公司名称
},
fetchMaterial: {
fetchMaterialList: "/type/selectMaTypeListByLevelIndex", // 获取设备列表
getDeptList: "/select/getUnitCbx", // 获取往来单位列表
getProjList: "/select/getSectionEngineeringCbx", // 获取工程列表
getDeviceDetail: "/type/selectMaTypeTreeByLevel", // 获取机具详情
getCartDetail: "/leaseUserBook", // 查询预约车内所有商品
addItemToCart: "/leaseUserBook", // 向预约车内添加商品
delCart: "/leaseUserBook", // 删除预约车商品
subCart: "/tm_task/submitLeaseApply", // 提交预约车
itemNumChange: "/leaseUserBook/update", // 预约车数量加减
},
fetchExam: {
fetchExamList: "/tm_task/getLeaseAuditList", // 获取领料审批清单
fetchExamListAll: "/tm_task/getLeaseAuditListAll", // 获取领料申请列表
fetchTrueExamList: "/tm_task/getLeaseManageListAll", // 获取领料审批列表
fetchTrueExamListCq: "/tm_task/getLeaseManageListAllCq", // 获取重庆领料审批列表
fetchDetailList: "/tm_task/getLeaseListAllCq", // 获取领料明细列表
subExam: "/tm_task/auditLeaseByCompany", // 通过领料审批
subExamCq: "/tm_task/auditLeaseByCompanyCq", // 通过重庆领料审批
rejectExam: "/tm_task/rejectLeaseByCompany", // 驳回领料审批
rejectExamCq: "/tm_task/rejectLeaseByCompanyCq", // 驳回重庆领料审批
},
fetchMaterialOutStore: {
fetchInfoByCode: "/leaseOutDetails/getMaMachineByCode", // 根据maId获取机具详情
fetchInfoByQrCode: "/leaseOutDetails/getMaMachineByQrCode",
subOutStore: "/leaseOutDetails/submitOut", // 领料出库提交-对象
subOutStoreArr: "/leaseOutDetails/submitOutRfid", // 领料出库提交-数组
fetchSingleDetail: "/tm_task/getLeaseAuditListDetail", // 根据领料id查询领料申请详情
searchRfid: "/backReceive/rfidCodeQuery", // 查询rfid
},
exitMaterial: {
exitDeptList: "/back_apply/getbackUnit", // 获取退料单位,工程列表
exitMaterialList: "/back_apply/getbackList", // 获取机具退料列表
exitMaterialDetail: "/back_apply/view", // 获取退料设备详情
subExitMaterial: "/back_apply/upload", // 提交退料清单
delMaterial: "/back_apply/del", // 删除退料申请
newExitList: "/back_apply/addBackTask", // 新建退料任务单
selectMaterial: "/back_apply/materialList", // 退料物料选择
ifAgreement: "/select/getAgreementInfoById", // 单位id和工程id是否匹配
},
exitExam: {
exitExamList: "/back_apply/examineList", // 获取退料审核列表
exitExamDetail: "/back_apply/examineView", // 获取退料审核明细
subExitExam: "/back_apply/audit", // 提交单个审核
rejectExitExam: "/back_apply/refuse", // 拒绝单个审核
},
newInStore: {
// fetchNewInStoreList: '/purchaseInput/list', // 获取新购入库列表
fetchNewInStoreList: "/purchaseCheckInfo/putInList", // 获取新购入库列表
fetchNewBuyDetail: "/purchaseMacode/putinDetails", // 获取新购入库详情
subNewBuy: "/purchaseInput/manageStatus", // 新购明细提交审核
},
fix: {
fixList: "/repair/getAppRepairTaskList", // 获取维修列表
fixDetail: "/repair/getAppRepairMaTypeList", // 获取维修明细
fixExam: "/repair/endRepairTask", // 提交维修审核
completeFix: "/repair/completeRepair", // 维修完成
submitFix: "/repair/submitRepairApply", // 提交维修申请
// fixCrew: '/repair/getUserSelect', // 获取维修人员
fixCrew: "/user/getUserByRoleList", // 获取维修人员
maList: "/maPartType/list", // 获取配件树
fixFactory: "/supplierInfo/getSupplierSelect", // 获取维修厂家
uploadPic: "/sys/file/upload", // 图片上传接口
},
repairTestInStore: {
repairTestInStoreList: "/RepairTestInput/getAppRepairedList", // 获取修试后入库列表
repairTestInStoreDetail:
"/RepairTestInput/getAppRepairedDetailList", // 获取修试后列表详情
processOrReject: "/RepairTestInput/inputByType", // 修试审核通过或驳回
},
backMaterialReceive: {
backMaterialReceiveList: "/backReceive/getbackReceiveList", // 获取退料接收列表
// backMaterialReceiveDetail: '/backReceive/receiveView',
backMaterialReceiveDetail: "/backReceive/receiveViewWeb",
backMaterialSetNumBack: "/backReceive/setNumBack",
backMaterialQrcodeQuery: "/backReceive/qrcodeQuery",
backMaterialSetCodeBack: "/backReceive/setCodeBack",
backReceiveCodeQuery: "/backReceive/codeQuery",
backReceiveEndBack: "/backReceive/endBack",
seeBackMaterialDetail: "/backReceive/backReceiveRecord", // 查看退料明细
searchRfid: "/backReceive/rfidCodeQuery", // 查询rfid
subRfid: "/backReceive/setRfidCodeBack", // rfid接收
searchByCode: "/backReceive/getBackMachineApp", // 根据编码查询该工程下的设备
searchCodeDevice: "/backReceive/getBackMachine", // 根据编码查询该工程下的设备
returnGetRecord: "/backReceive/getRecord", // 根据编码查询该工程下的设备
},
// 报废审核接口
crashExam: {
crashExamList: "/scrap/getScrapTaskList",
crashExamDetails: "/scrap/getScrapAuditList",
crashExamAudit: "/scrap/audit",
},
//试验检验接口
testExam: {
testExamList: "/details/questList",
testExamDetails: "/details/getRepairAuditList",
testExamAudit: "/details/audit",
},
authManage: {
fetchAuthList: "/appMenu/getAllMenu", // 获取所有模块数据
fetchIsUsing: "/appMenu/getMenuById", // 获取正在使用的模块
subAdd: "/appMenu/addMenuById", // 提交新增模块
subDel: "/appMenu/delMenuById", // 提交删除模块
},
searchProjUsing: {
fetchProjUsingList: "/leaseOutDetails/proUseRecord", // 获取工程在用列表
},
searchFetchRecord: {
fetchRecordList: "/leaseOutDetails/leaseOutRecord", // 获取领用记录列表
},
update: {
fetchAppVer: "/app/getVersion", // 获取app当前版本号
},
rfidBinding: {
bindRfid: "/leaseOutDetails/bindMachineByRfid", // rifd绑定
},
qrcodeBinding: {
bindQrcode: "/leaseOutDetails/bindMachineByQrCode", // 二维码绑定
fetchDeviceType: "/returnOfMaterialsInfo/getMaTypeList", // 获取设备类型
fetchDeviceSpec: "/returnOfMaterialsInfo/getInfoListByType", // 获取规格型号
},
indexScan: {
infoByCode: "/machine/getMachineByQrCode", // 首页根据二维码查询设备信息
},
};
}
export default new HttpConfig();

183
apis/request.js Normal file
View File

@ -0,0 +1,183 @@
class Http {
get(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "GET",
dataType: "json",
header: {
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res);
}
},
fail(err) {
reject(err);
},
});
});
}
post(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "POST",
dataType: "json",
header: {
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
// console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res);
}
},
fail(err) {
// console.log(err);
reject(err);
},
});
});
}
put(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "PUT",
dataType: "json",
header: {
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res);
}
},
fail(err) {
reject(err);
},
});
});
}
delete(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "DELETE",
dataType: "json",
header: {
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res);
}
},
fail(err) {
reject(err);
},
});
});
}
upload(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: baseUrl + url,
filePath: data,
header: {
Authorization: uni.getStorageSync("token"),
...header,
},
name: "file",
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res);
}
},
fail(err) {
reject(err);
},
});
});
}
}
export default new Http();

20
index.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

34
main.js Normal file
View File

@ -0,0 +1,34 @@
import App from './App'
import {
router,
RouterMount
} from './router.js'
// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import './uni.promisify.adaptor'
import $api from '@/apis/apis.js'
Vue.config.productionTip = false
Vue.prototype.$api = $api
Vue.use(router)
.use(uView)
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

161
manifest.json Normal file
View File

@ -0,0 +1,161 @@
{
"name" : "智慧仓储",
"appid" : "__UNI__9D122E1",
"description" : "",
"versionName" : "1.1.1",
"versionCode" : 111,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"compatible" : {
"ignoreVersion" : true
},
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {
"Camera" : {},
"Barcode" : {}
},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
// "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
// "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
// "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />",
// "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\" />",
"<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\" />",
"<uses-permission android:name=\"android.permission.READ_LOGS\\\" />",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\\\" />"
]
},
// "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\\\" />",
// "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\\\" />"
/* ios */
"ios" : {
"dSYMs" : false,
"idfa" : false,
"privacyDescription" : {
"NSPhotoLibraryUsageDescription" : "该应用上传照片信息时需要访问您的相册",
"NSPhotoLibraryAddUsageDescription" : "该应用上传照片信息时需要访问您的相册",
"NSCameraUsageDescription" : "该应用需要扫描二维码或拍照,是否允许打开相机",
"NSMicrophoneUsageDescription" : "该应用需要使用您的麦克风,以便视频录音",
"NSLocationWhenInUseUsageDescription" : "该应用需要使用您的地理位置,以便为您提供当前位置信息",
"NSLocationAlwaysUsageDescription" : "该应用需要使用您的地理位置,以便为您提供当前位置信息",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要使用您的地理位置,以便为您提供当前位置信息"
}
},
/* SDK */
"sdkConfigs" : {
"ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
},
"nativePlugins" : {
"DeviceModule" : {
"__plugin_info__" : {
"name" : "DeviceModule",
"description" : "DeviceModule",
"platforms" : "Android",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"h5" : {
"devServer" : {
"proxy" : {
"^/api" : {
"target" : "http://112.29.103.165:21624",
"ws" : true,
"changeOrigin" : true,
"pathRewrite" : {
"^/api" : ""
}
}
}
}
},
"vueVersion" : "2"
}

View File

@ -0,0 +1 @@

Some files were not shown because too many files have changed in this diff Show More