diff --git a/.env.production b/.env.production index 34fbd6dd..eea855a1 100644 --- a/.env.production +++ b/.env.production @@ -8,14 +8,23 @@ ENV = 'production' #林纪裕cd -VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/' -刘恩典 +# 刘恩典 # VUE_APP_BASE_API = 'http://192.168.0.127:9150/UDI_WMS_MC/' -# VUE_APP_BASE_API = 'http://192.168.0.127:9160/UDI_WMS_MC/' +# 吴雨泽 +# VUE_APP_BASE_API = 'http://192.168.0.67:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://192.168.0.127:9170/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://dm.xmglxp.com:8082/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://dm.xmglxp.com:82/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://dm.xmglxp.com:8001/UDI_WMS_MC/' + +# 诏安总医院 +# VUE_APP_BASE_API = 'http://192.168.8.58:9150/UDI_WMS_MC/' + + # 平潭正式 # VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/' @@ -29,10 +38,43 @@ VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/' # 平和县医院 # VUE_APP_BASE_API = 'http://192.168.0.43:9150/UDI_WMS_MC/' -# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/' + # 长泰医院 -# VUE_APP_BASE_API = 'http://192.168.6.189:9150/UDI_WMS_MC/' +VUE_APP_BASE_API = 'http://192.168.6.189:9150/UDI_WMS_MC/' + +# 三明大田医院 +# VUE_APP_BASE_API = 'http://172.20.124.4:9150/UDI_WMS_MC/' + + +# VUE_APP_BASE_API = 'http://192.168.0.207:9150/UDI_WMS_MC/' + +# VUE_APP_BASE_API = 'http://192.168.0.191:9150/UDI_WMS_MC/' + +# 林纪裕centos +# VUE_APP_BASE_API = 'http://192.168.0.86:9150/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://192.168.31.2:9150/UDI_WMS_MC/' + + +# VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://192.168.80.80:9150/UDI_WMS_MC/' + +# VUE_APP_BASE_API = 'http://192.168.0.207:9160/UDI_WMS_MC/' + +# 云霄妇幼保健 +# VUE_APP_BASE_API = 'http://192.168.0.11:9150/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://192.168.0.67:9150/UDI_WMS_MC/' + +# 东山 +# VUE_APP_BASE_API = 'https://mudi.dsxyy.org/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://151.122.122.146:9150/UDI_WMS_MC/' + + +# 南靖 +# VUE_APP_BASE_API = 'http://192.168.10.225:9150/UDI_WMS_MC/' +# VUE_APP_BASE_API = 'http://192.168.73.128:9150/UDI_WMS_MC/' +# 测试NIGINX +# VUE_APP_BASE_API = 'https://test.udims.com/UDI_WMS_MC/' # 应用访问路径 例如使用前缀 /admin/ diff --git a/package.json b/package.json index 2638a060..a0ebfe56 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,8 @@ "js-cookie": "3.0.1", "js-sha256": "^0.10.1", "jsencrypt": "3.0.0-rc.1", + "loadsh": "^0.0.4", + "lodash": "^4.17.21", "nprogress": "0.2.0", "pinyin": "^2.10.2", "qrcodejs2": "^0.0.2", diff --git a/public/index.html b/public/index.html index e32e1293..973ace06 100644 --- a/public/index.html +++ b/public/index.html @@ -1,14 +1,16 @@ - - - - - - - <%= webpackConfig.name %> - - - - -
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
- + + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ diff --git a/src/App.vue b/src/App.vue index 9cf24578..207e042c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,27 +1,76 @@ diff --git a/src/api/basic/basicManuMaintain.js b/src/api/basic/basicManuMaintain.js new file mode 100644 index 00000000..91a6ab9b --- /dev/null +++ b/src/api/basic/basicManuMaintain.js @@ -0,0 +1,61 @@ +import axios from "@/utils/request"; + +export function getBasicManuMaintains(query) { + return axios({ + url: "/udiwms/basic/manu/maintain/filter", + method: "get", + params: query + }); +} + + +export function basicUnitMaintainSave(data, formName, method = "post") { + let url = + formName === "add" ? "/udiwms/basic/manu/maintain/save" : "/udiwms/basic/manu/maintain/update"; + return axios({ + url: url, + method: method, + data: data + }); +} + + +export function deleteBasicUnitMaintain(query) { + return axios({ + url: "/udiwms/basic/manu/maintain/delete", + method: "post", + data: query + }); +} + +export function combine(query) { + return axios({ + url: "/udiwms/basic/manu/maintain/combine", + method: "post", + data: query + }); +} + +export function combineAll(query) { + return axios({ + url: "/udiwms/basic/manu/maintain/combineAll", + method: "get", + params: query + }); +} + +export function combineSingle(query) { + return axios({ + url: "/udiwms/basic/manu/maintain/combineSingle", + method: "post", + data: query + }); +} + +export function getThrsysUnit(query) { + return axios({ + url: "/udiwms/manutMaintain/thirdSys/detail", + method: "get", + params: query + }); +} diff --git a/src/api/basic/sicker/prescribeApi.js b/src/api/basic/sicker/prescribeApi.js index 9d6dbaf3..937fb81c 100644 --- a/src/api/basic/sicker/prescribeApi.js +++ b/src/api/basic/sicker/prescribeApi.js @@ -27,3 +27,5 @@ export function downloadPrescribe(query) { + + diff --git a/src/api/basic/sicker/skPersonApi.js b/src/api/basic/sicker/skPersonApi.js index bc9e5e10..bb2c82ff 100644 --- a/src/api/basic/sicker/skPersonApi.js +++ b/src/api/basic/sicker/skPersonApi.js @@ -9,6 +9,15 @@ export function page(query) { }); } +export function filterNoPage(query) { + return axios({ + url: "/udiwms/basic/sk/sicker/filter/noPage", + method: "get", + params: query + }); +} + + export function downloadSick(query) { return axios({ url: "/udiwms/basic/sk/sicker/download", @@ -17,5 +26,68 @@ export function downloadSick(query) { }); } +/** + * 远程下载 + */ +export function remoteFilter(query) { + return axios({ + url: "/udiwms/basic/sk/sicker/filter/remote", + method: "get", + params: query + }); +} + + +/** + * 处方使用耗材明细 + */ +export function skPrescribeDi(query) { + return axios({ + url: "/udiwms/basic/sk/prescribe/di/filter", + method: "get", + params: query + }); +} + +export function skPrescribeCheck(query) { + return axios({ + url: "/udiwms/basic/sk/prescribe/check", + method: "get", + params: query + }); +} + + +/** + * 下载并查询处方信息 + */ + +export function dlOrFilter(query) { + return axios({ + url: "/udiwms/basic/sk/prescribe/di/dlOrFilter", + method: "get", + params: query + }); +} + +/** + * 在线实时获取患者信息 + * @param query + * @returns {AxiosPromise} + */ +export function dlSickerOnline(query) { + return axios({ + url: "/udiwms/basic/sk/sicker/filter/onLine", + method: "get", + params: query + }); +} + + + + + + + diff --git a/src/api/dev/deviceChangeOrderApi.js b/src/api/dev/deviceChangeOrderApi.js new file mode 100644 index 00000000..4790e2b8 --- /dev/null +++ b/src/api/dev/deviceChangeOrderApi.js @@ -0,0 +1,81 @@ +import axios from "@/utils/request"; + +export function changeOrderPage(query) { + return axios( + { + url: "/udi/device/changeOrder/page", + method: "POST", + data: query + } + ) +} + +export function saveDraftOrder(query) { + return axios( + { + url: "/udi/device/changeOrder/draft/save", + method: "POST", + data: query + } + ) +} +export function delDraftOrder(query) { + return axios( + { + url: "/udi/device/changeOrder/del", + method: "POST", + data: query + } + ) +} + + +export function saveChangeOrder(query) { + return axios( + { + url: "/udi/device/changeOrder/save", + method: "POST", + data: query + } + ) +} + +export function changeOrderDetailByUser(query) { + return axios( + { + url: "/udi/device/changeOrder/detailByUser", + method: "POST", + data: query + } + ) +} + +export function cancelChangeOrder(orderId, query) { + return axios( + { + url: `/udi/device/changeOrder/cancel/${orderId}`, + method: "GET", + params: query + } + ) +} + +export function confirmChangeOrder(orderId, query) { + return axios( + { + url: `/udi/device/changeOrder/confirm/${orderId}`, + method: "GET", + params: query + } + ) +} + +export function rejectChangeOrder(orderId, query) { + return axios( + { + url: `/udi/device/changeOrder/reject/${orderId}`, + method: "GET", + params: query + } + ) +} diff --git a/src/api/dev/deviceCheckApi.js b/src/api/dev/deviceCheckApi.js new file mode 100644 index 00000000..8126aeec --- /dev/null +++ b/src/api/dev/deviceCheckApi.js @@ -0,0 +1,49 @@ +import axios from "@/utils/request"; + +export function deviceCheckGenByPlanId(planId) { + return axios( + { + url: `/udi/device/check/gen/${planId}`, + method: "GET" + } + ) +} + +export function deviceCheckPage(query) { + return axios( + { + url: `/udi/device/check/page`, + method: "POST", + data: query + } + ) +} + +export function deviceCheckPageByDept(query) { + return axios( + { + url: `/udi/device/check/pageByDept`, + method: "POST", + data: query + } + ) +} + +export function deviceCheckPrint(taskId) { + return axios( + { + url: `/udi/device/check/info/print/${taskId}`, + method: "GET" + } + ) +} + +export function deviceCheckPrintByDeviceCode(taskId, deviceCode) { + return axios( + { + url: `/udi/device/check/info/print/${taskId}/${deviceCode}`, + method: "GET" + } + ) +} + diff --git a/src/api/dev/deviceCheckDetailApi.js b/src/api/dev/deviceCheckDetailApi.js new file mode 100644 index 00000000..04cea3a3 --- /dev/null +++ b/src/api/dev/deviceCheckDetailApi.js @@ -0,0 +1,21 @@ +import axios from "@/utils/request"; +export function deviceCheckDetailPage(query) { + return axios( + { + url: `/udi/device/check/detail/page`, + method: "POST", + data: query + } + ) +} + +export function deviceCheckDetailRepair(query) { + return axios( + { + url: `/udi/device/check/detail/repair`, + method: "POST", + data: query + } + ) +} + diff --git a/src/api/dev/deviceCheckDetailItemApi.js b/src/api/dev/deviceCheckDetailItemApi.js new file mode 100644 index 00000000..393e8615 --- /dev/null +++ b/src/api/dev/deviceCheckDetailItemApi.js @@ -0,0 +1,20 @@ +import axios from "@/utils/request"; +export function deviceCheckDetailItemPage(query) { + return axios( + { + url: `/udi/device/check/detail/item/page`, + method: "POST", + data: query + } + ) +} +export function deviceCheckDetailItemFinish(query) { + return axios( + { + url: `/udi/device/check/detail/item/finish`, + method: "POST", + data: query + } + ) +} + diff --git a/src/api/dev/deviceCheckItemDictApi.js b/src/api/dev/deviceCheckItemDictApi.js new file mode 100644 index 00000000..961dc5ba --- /dev/null +++ b/src/api/dev/deviceCheckItemDictApi.js @@ -0,0 +1,40 @@ +import axios from "@/utils/request"; + +export function genCheckItemCode() { + return axios( + { + url: "/udi/device/checkItemDict/code/gen", + method: "GET" + } + ) +} + +export function deviceCheckItemDictPage(query) { + return axios( + { + url: "/udi/device/checkItemDict/page", + method: "POST", + data: query + } + ) +} + +export function saveDeviceCheckItemDict(query) { + return axios( + { + url: "/udi/device/checkItemDict/save", + method: "POST", + data: query + } + ) +} + +export function delDeviceCheckItemDict(query) { + return axios( + { + url: `/udi/device/checkItemDict/del/${query}`, + method: "DELETE" + } + ) +} + diff --git a/src/api/dev/deviceInfoApi.js b/src/api/dev/deviceInfoApi.js new file mode 100644 index 00000000..7d6bdf2e --- /dev/null +++ b/src/api/dev/deviceInfoApi.js @@ -0,0 +1,90 @@ +import axios from "@/utils/request"; + +export function devicePage(query) { + return axios( + { + url: "/udi/device/info/page", + method: "POST", + data: query + } + ) +} + +export function detailByUserPage(query) { + return axios( + { + url: "/udi/device/info/detailByUser/page", + method: "POST", + data: query + } + ) +} + +export function deviceAllPage(query) { + return axios( + { + url: "/udi/device/info/all/page", + method: "POST", + data: query + } + ) +} + +export function detailPage(query) { + return axios( + { + url: "/udi/device/info/detail/page", + method: "POST", + data: query + } + ) +} + +export function deviceDetailInfo(query) { + return axios( + { + url: "/udi/device/detailInfo/page", + method: "POST", + data: query + } + ) +} + +export function deviceLogs(deviceCode) { + return axios( + { + url: `/udi/device/log/${deviceCode}`, + method: "GET" + } + ) +} + +export function genDeviceCode(deviceCode) { + return axios( + { + url: `/udi/device/code/gen`, + method: "GET" + } + ) +} + +export function genDeviceQR(deviceCode) { + return axios( + { + url: `/udi/device/genQR/${deviceCode}`, + method: "GET" + } + ) +} + +export function printDevLabel(query) { + return axios({ + url: "/udiwms/inv/deptDev/label/print", + method: "post", + data: query, + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + }); +} + + diff --git a/src/api/dev/devicePlanApi.js b/src/api/dev/devicePlanApi.js new file mode 100644 index 00000000..b5dfdc3b --- /dev/null +++ b/src/api/dev/devicePlanApi.js @@ -0,0 +1,40 @@ +import axios from "@/utils/request"; + +export function devicePlanPage(query) { + return axios( + { + url: "/udi/device/plan/page", + method: "POST", + data: query + } + ) +} + +export function devicePlanSave(query) { + return axios( + { + url: "/udi/device/plan/save", + method: "POST", + data: query + } + ) +} + +export function devicePlanInfo(planId) { + return axios( + { + url: `/udi/device/plan/info/${planId}`, + method: "GET" + } + ) +} + +export function devicePlanDel(planId) { + return axios( + { + url: `/udi/device/plan/del/${planId}`, + method: "DELETE" + } + ) +} + diff --git a/src/api/dev/devicePlanDetailApi.js b/src/api/dev/devicePlanDetailApi.js new file mode 100644 index 00000000..3bd76ef5 --- /dev/null +++ b/src/api/dev/devicePlanDetailApi.js @@ -0,0 +1,49 @@ +import axios from "@/utils/request"; + +export function devicePlanDetailGroupPage(query) { + return axios( + { + url: "/udi/device/plan/detailGroup/page", + method: "POST", + data: query + } + ) +} +export function devicePlanDetailPage(query) { + return axios( + { + url: "/udi/device/plan/detail/page", + method: "POST", + data: query + } + ) +} + +export function devicePlanDetailAdd(query) { + return axios( + { + url: "/udi/device/plan/detail/add", + method: "POST", + data: query + } + ) +} + +export function devicePlanDetailDel(planId,productId) { + return axios( + { + url: `/udi/device/plan/detail/delByProductId/${planId}/${productId}`, + method: "DELETE" + } + ) +} + +export function devicePlanDetailDelByDeviceCode(planId,deviceCode) { + return axios( + { + url: `/udi/device/plan/detail/delByDeviceCode/${planId}/${deviceCode}`, + method: "DELETE" + } + ) +} + diff --git a/src/api/dev/devicePlanDetailItemApi.js b/src/api/dev/devicePlanDetailItemApi.js new file mode 100644 index 00000000..52d2f1cd --- /dev/null +++ b/src/api/dev/devicePlanDetailItemApi.js @@ -0,0 +1,40 @@ +import axios from "@/utils/request"; + +export function devicePlanDetailItemPage(query) { + return axios( + { + url: "/udi/device/plan/detail/item/page", + method: "POST", + data: query + } + ) +} + +export function devicePlanDetailItemAdd(query) { + return axios( + { + url: "/udi/device/plan/detail/item/add", + method: "POST", + data: query + } + ) +} + +export function devicePlanDetailItemDel(planId,productId,itemCode) { + return axios( + { + url: `/udi/device/plan/detail/item/delByProductId/${planId}/${productId}/${itemCode}`, + method: "DELETE" + } + ) +} + +export function devicePlanDetailItemByDeviceCodeDel(planId,deviceCode,itemCode) { + return axios( + { + url: `/udi/device/plan/detail/item/delByDeviceCode/${planId}/${deviceCode}/${itemCode}`, + method: "DELETE" + } + ) +} + diff --git a/src/api/dev/deviceRepairApi.js b/src/api/dev/deviceRepairApi.js new file mode 100644 index 00000000..44eb0a97 --- /dev/null +++ b/src/api/dev/deviceRepairApi.js @@ -0,0 +1,29 @@ +import axios from "@/utils/request"; + +export function deviceRepairByUserPage(query) { + return axios( + { + url: "/udi/device/repair/byUser/page", + method: "POST", + data: query + } + ) +} + +export function deviceRepairInfo(repairId) { + return axios( + { + url: `/udi/device/repair/info/${repairId}`, + method: "GET" + } + ) +} + +export function finishRepairByUser(repairId) { + return axios( + { + url: `/udi/device/repair/finishByUser/${repairId}`, + method: "GET" + } + ) +} diff --git a/src/api/dev/deviceRepairApplyApi.js b/src/api/dev/deviceRepairApplyApi.js new file mode 100644 index 00000000..24824b53 --- /dev/null +++ b/src/api/dev/deviceRepairApplyApi.js @@ -0,0 +1,51 @@ +import axios from "@/utils/request"; + +export function deviceRepairApplyPage(query) { + return axios( + { + url: "/udi/device/repair/apply/page", + method: "POST", + data: query + } + ) +} + +export function deviceRepairApplyHallPage(query) { + return axios( + { + url: "/udi/device/repair/apply/hall/page", + method: "POST", + data: query + } + ) +} + +export function deviceRepairApplyConfirmByUserPage(query) { + return axios( + { + url: "/udi/device/repair/apply/confirmByUser/page", + method: "POST", + data: query + } + ) +} + +export function deviceRepairApplyAdd(query) { + return axios( + { + url: "/udi/device/repair/apply/add", + method: "POST", + data: query + } + ) +} + +export function confirmDeviceRepairApply(query) { + return axios( + { + url: "/udi/device/repair/apply/confirm", + method: "POST", + data: query + } + ) +} diff --git a/src/api/dev/deviceRepairApplyDetailApi.js b/src/api/dev/deviceRepairApplyDetailApi.js new file mode 100644 index 00000000..58592e1a --- /dev/null +++ b/src/api/dev/deviceRepairApplyDetailApi.js @@ -0,0 +1,20 @@ +import axios from "@/utils/request"; + +export function deviceRepairApplyDetailPage(query) { + return axios( + { + url: "/udi/device/repair/apply/detail/page", + method: "POST", + data: query + } + ) +} +export function deviceRepairApplyDetailDiagnosis(query) { + return axios( + { + url: "/udi/device/repair/apply/detail/diagnosis", + method: "POST", + data: query + } + ) +} diff --git a/src/api/inout/receiveOrder.js b/src/api/inout/receiveOrder.js index c49b2267..699814c5 100644 --- a/src/api/inout/receiveOrder.js +++ b/src/api/inout/receiveOrder.js @@ -19,6 +19,14 @@ export function addDetail(query) { }); } +export function repeatAdd(query) { + return axios({ + url: "/udiwms/thrsys/order/repeatAdd", + method: "post", + data: query + }); +} + export function getOrderDetail(query) { return axios({ diff --git a/src/api/inout/statData.js b/src/api/inout/statData.js index 45788d0a..42cbdb19 100644 --- a/src/api/inout/statData.js +++ b/src/api/inout/statData.js @@ -49,3 +49,21 @@ export function excelImport(params) { }); } + +export function createCustom(query) { + return axios({ + url: "/udiwms/inout/detail/custom/create", + method: "post", + data: query + }); +} + +export function filterCusDetailList(params) { + return axios({ + url: "/udiwms/inout/detail/custom/filter", + method: "get", + params: params + }); +} + + diff --git a/src/api/inventory/stockCompareApi.js b/src/api/inventory/stockCompareApi.js index 6c02096d..4462b1f1 100644 --- a/src/api/inventory/stockCompareApi.js +++ b/src/api/inventory/stockCompareApi.js @@ -16,6 +16,7 @@ export function selectInvProductDetail(params) { }); } + export function stockCompareSave(params) { return axios({ url: "/udiwms/stockCompare/save", @@ -47,6 +48,23 @@ export function stockCompareDetailPage(params) { }); } +export function stockCompareResultPage(params) { + return axios({ + url: "/udiwms/stockCompare/detail/result", + method: "POST", + data: params + }); +} + +export function dlThrCpProduct(params) { + return axios({ + url: "/udiwms/stockCompare/addThrProduct", + method: "POST", + data: params + }); +} + + export function stockCompareDetailDel(params) { return axios({ url: "/udiwms/stockCompare/detail/del", @@ -54,3 +72,22 @@ export function stockCompareDetailDel(params) { data: params }); } + +export function uploadCompare(compareId) { + return axios({ + url: `/udiwms/stockCompare/compare/${compareId}`, + method: "POST", + }); +} + + + + +export function compareExportExcel(data) { + return axios({ + url: "/udiwms/stockCompare/compare/exportExcel", + method: "post", + responseType: 'blob', + data: data + }); +} diff --git a/src/api/thrsys/thrManus.js b/src/api/thrsys/thrManus.js new file mode 100644 index 00000000..ad87743e --- /dev/null +++ b/src/api/thrsys/thrManus.js @@ -0,0 +1,37 @@ +import axios from "@/utils/request"; + +export function getCorps(query) { + return axios({ + url: "/udiwms/thrsys/getManus", + method: "get", + params: query + }); +} + +export function delCorps(query) { + return axios({ + url: "/udiwms/thrsys/delManus", + method: "post", + data: query + }); +} + + +export function corpsDlAll(query) { + return axios({ + url: "/udiwms/thrsys/manu/corpsDlAll", + method: "post", + data: query + }); +} + +export function getErpManus(query) { + return axios({ + url: "/udiwms/manu/filterErp", + method: "get", + params: query + }); +} + + + diff --git a/src/assets/styles/ruoyi.scss b/src/assets/styles/ruoyi.scss index 114ed4a3..42c78b96 100644 --- a/src/assets/styles/ruoyi.scss +++ b/src/assets/styles/ruoyi.scss @@ -90,6 +90,9 @@ .el-dialog { .el-dialog__header { } + .el-dialog__body{ + //padding: 0; + } .el-dialog__title { line-height: 24px; @@ -349,6 +352,7 @@ margin-right: 15px; margin-left: 15px; margin-top: 15px; + //margin-bottom: 15px; /*transition: all .5s;*/ } @@ -367,10 +371,21 @@ margin-top: -10px } -.el-form-item { - margin-right: 10px; - margin-bottom: 1px; - margin-top: 1px; +//.el-form-item { +// margin-right: 10px; +// margin-bottom: 1px; +// margin-top: 1px; +//} + + +//.el-form { +// margin-top: -10px; +//} + +.query-form-item { + margin-right: 5px; + margin-bottom: 51px; } + diff --git a/src/main.js b/src/main.js index b9992fbe..1712e6d0 100644 --- a/src/main.js +++ b/src/main.js @@ -57,10 +57,16 @@ Vue.config.silent = true; //自定义消息框 import ShowMsgBox from '@/utils/MsgBox' + +//自定义组件 import invSelect from "@/views/components/invSelect/invSelect.vue"; import mainActionSelect from "@/views/components/mainActionSelect/index.vue"; import thirdSysSelect from "@/views/components/thirdSysSelect/index.vue"; import actionSelect from "@/views/components/actionSelect/index.vue"; +import deptSelect from "@/views/components/deptSelect/index.vue"; +import planChooseDevice from "@/views/components/planChooseDevice/index.vue"; + +import _ from "loadsh" // 全局方法挂载 Vue.prototype.getDicts = getDicts; @@ -73,6 +79,13 @@ Vue.prototype.selectDictLabel = selectDictLabel; Vue.prototype.selectDictLabels = selectDictLabels; Vue.prototype.download = download; Vue.prototype.handleTree = handleTree; +Vue.prototype.openNewWindow = (url)=>{ + return window.open(url,'_blank',`width=1000,height=800,resizable=yes,scrollbars=yes,status=yes,menubar=no,toolbar=no,location=no,left=500,top=200`) +} + +import deviceInfo from "@/views/dev/deviceInfo.vue"; +import deviceRepairDialog from "@/views/components/deviceRepairDialog/index.vue"; + // 全局组件挂载 Vue.component("DictTag", DictTag); @@ -88,6 +101,10 @@ Vue.component("invSelect", invSelect) Vue.component("mainActionSelect", mainActionSelect) Vue.component("thirdSysSelect", thirdSysSelect) Vue.component("actionSelect", actionSelect) +Vue.component("deptSelect", deptSelect) +Vue.component("planChooseDevice", planChooseDevice) +Vue.component("deviceInfo", deviceInfo) +Vue.component("deviceRepairDialog", deviceRepairDialog) Vue.use(directive); Vue.use(plugins); @@ -112,9 +129,23 @@ Element.Dialog.props.appendToBody = {type: Boolean, default: true} Element.Table.props.border = {type: Boolean, default: true} Element.Table.props.minHeight = {type: String | Number, default: "250"} Element.Table.props.fit = {type: Boolean, default: true} +Element.Table.props.stripe = {type: Boolean, default: true} +Element.TableColumn.props.highlightCurrentRow = {type: Boolean, default: true} Element.TableColumn.props.showOverflowTooltip = {type: Boolean, default: true} Element.DatePicker.props.firstDayOfWeek = {type: Number, default: 1} - +Element.Tag.props.effect = {type: String, default: 'dark'} + + +Element.Select.methods.deleteSelected = + function deleteSelected(event) { + event.stopPropagation() + // 改动在这,原始的是这样 var value = this.multiple ? [] : '' + var value = this.multiple ? [] : null + this.$emit("input", value) + this.emitChange(value) + this.visible = false + this.$emit("clear") + } Vue.use(Element, { size: Cookies.get("size") || "mini", // set element-ui default size diff --git a/src/store/getters.js b/src/store/getters.js index b3dedfe4..49d31f9b 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -22,5 +22,6 @@ const getters = { locDeptName: state => state.user.locDeptName, locInvName: state => state.user.locInvName, adminId: state => state.user.adminId, + user: state => state.user.user, } export default getters diff --git a/src/store/modules/permission.js b/src/store/modules/permission.js index 521d96d1..e0bf8751 100644 --- a/src/store/modules/permission.js +++ b/src/store/modules/permission.js @@ -131,4 +131,5 @@ export const loadView = (view) => { } } + export default permission diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 430f24e1..38d090e6 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -4,6 +4,7 @@ import {sha256} from "js-sha256"; const user = { state: { + user: null, adminId: "", token: getToken(), name: '', @@ -21,6 +22,10 @@ const user = { mutations: { + SET_USER: (state, user) => { + state.user = user + }, + SET_ADMINID: (state, adminId) => { state.adminId = adminId }, @@ -77,6 +82,7 @@ const user = { setAdminId(res.data.id) commit('SET_TOKEN', res.data.token) commit('SET_ADMINID', res.data.id) + commit('SET_USER', res.data) resolve(res) } else { reject(res.message); @@ -99,6 +105,7 @@ const user = { } else { commit('SET_ROLES', ['ROLE_DEFAULT']) } + commit('SET_USER', user) commit('SET_AVATAR', avatar) commit('SET_NAME', user.userName) commit('SET_EMPLOYEENAME', user.employeeName) @@ -108,6 +115,7 @@ const user = { commit('SET_LOCIVNCODE', user.locInvCode) commit('SET_LOCDEPTNAME', user.locDeptName) commit('SET_LOCIVNNAME', user.locInvName) + commit('SET_ADMINID', user.id) resolve(res) console.log("获取用户数据成功-=----"); }).catch(error => { @@ -131,6 +139,7 @@ const user = { commit('SET_LOCIVNCODE', "") commit('SET_LOCDEPTNAME', "") commit('SET_LOCIVNNAME', "") + commit('SET_USER', null) removeToken() removeAdminId() resolve() diff --git a/src/utils/enum.js b/src/utils/enum.js new file mode 100644 index 00000000..93029e6c --- /dev/null +++ b/src/utils/enum.js @@ -0,0 +1,36 @@ +export const deviceChangeType = { + ADD: {key: "ADD", tagType: "primary", desc: "新增入库"}, + CHANGE: {key: "CHANGE", tagType: "warning", desc: "变更归属"}, + DESTROY: {key: "DESTROY", tagType: "danger", desc: "销毁/报废"}, +} + +export const deviceChangeStatus = { + DRAFT: {key: "DRAFT", tagType: "warning", desc: "草稿"}, + WAIT_CONFIRM: {key: "WAIT_CONFIRM", tagType: "warning", desc: "待目标部门确认"}, + REJECT_CONFIRM: {key: "REJECT_CONFIRM", tagType: "danger", desc: "目标部门拒绝"}, + FINISH: {key: "FINISH", tagType: "success", desc: "已完成"}, + CANCEL: {key: "CANCEL", tagType: "info", desc: "已取消"}, +} + +export const deviceStatus = { + NORMAL: {key: "NORMAL", tagType: "success", desc: "正常"}, + CHANGE: {key: "CHANGE", tagType: "warning", desc: "变更归属中"}, + REPAIR_APPLY: {key: "REPAIR_APPLY", tagType: "warning", desc: "维修申请中"}, + REPAIR: {key: "REPAIR", tagType: "danger", desc: "维修中"}, + // CHECK: {key: "CHECK", tagType: "warning", desc: "等待巡检"}, + DESTROY: {key: "DESTROY", tagType: "danger", desc: "销毁/报废"}, +} + +export const deviceRepairApplyStatus = { + WAIT_PROCESS: {key: "WAIT_PROCESS", tagType: "warning", desc: "待受理"}, + PROCESSING: {key: "PROCESSING", tagType: "primary", desc: "受理中"}, + // REPAIRING: {key: "REPAIRING", tagType: "primary", desc: "维修中"}, + FINISH: {key: "FINISH", tagType: "success", desc: "完成"}, +} + +export const deviceRepairApplyDetailStatus = { + WAIT_DIAGNOSIS: {key: "WAIT_DIAGNOSIS", tagType: "warning", desc: "待诊断"}, + // WAIT_REPAIR: {key: "WAIT_REPAIR", tagType: "warning", desc: "待维修"}, + REPAIRING: {key: "REPAIRING", tagType: "primary", desc: "维修中"}, + FINISH: {key: "FINISH", tagType: "success", desc: "完成"}, +} diff --git a/src/utils/index.js b/src/utils/index.js index df5db12b..6dee488e 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,18 +1,45 @@ -import { parseTime } from './ruoyi' +import {parseTime} from './ruoyi' + +export function copyProperties(source, target) { + const keys = Object.keys(target); + return Object.assign({}, ...keys.map(key => ({[key]: source[key]||target[key]}))); +} + +export function downloadBase64Image(base64, fileName) { + const a = document.createElement('a'); + a.href = base64; + a.download = fileName; + a.click(); + a.remove() +} + +export function getLoading(that) { + + let loading = that.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + setTimeout(()=>{ + loading.close() + },30000) + return loading +} /** * 表格时间格式化 */ export function formatDate(cellValue) { - if (cellValue == null || cellValue == "") return ""; - var date = new Date(cellValue) - var year = date.getFullYear() - var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 - var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() - var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() - var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() - var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() - return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds + if (cellValue == null || cellValue == "") return ""; + var date = new Date(cellValue) + var year = date.getFullYear() + var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 + var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() + var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds } /** @@ -21,41 +48,41 @@ export function formatDate(cellValue) { * @returns {string} */ export function formatTime(time, option) { - if (('' + time).length === 10) { - time = parseInt(time) * 1000 - } else { - time = +time - } - const d = new Date(time) - const now = Date.now() - - const diff = (now - d) / 1000 - - if (diff < 30) { - return '刚刚' - } else if (diff < 3600) { - // less 1 hour - return Math.ceil(diff / 60) + '分钟前' - } else if (diff < 3600 * 24) { - return Math.ceil(diff / 3600) + '小时前' - } else if (diff < 3600 * 24 * 2) { - return '1天前' - } - if (option) { - return parseTime(time, option) - } else { - return ( - d.getMonth() + - 1 + - '月' + - d.getDate() + - '日' + - d.getHours() + - '时' + - d.getMinutes() + - '分' - ) - } + if (('' + time).length === 10) { + time = parseInt(time) * 1000 + } else { + time = +time + } + const d = new Date(time) + const now = Date.now() + + const diff = (now - d) / 1000 + + if (diff < 30) { + return '刚刚' + } else if (diff < 3600) { + // less 1 hour + return Math.ceil(diff / 60) + '分钟前' + } else if (diff < 3600 * 24) { + return Math.ceil(diff / 3600) + '小时前' + } else if (diff < 3600 * 24 * 2) { + return '1天前' + } + if (option) { + return parseTime(time, option) + } else { + return ( + d.getMonth() + + 1 + + '月' + + d.getDate() + + '日' + + d.getHours() + + '时' + + d.getMinutes() + + '分' + ) + } } /** @@ -63,18 +90,18 @@ export function formatTime(time, option) { * @returns {Object} */ export function getQueryObject(url) { - url = url == null ? window.location.href : url - const search = url.substring(url.lastIndexOf('?') + 1) - const obj = {} - const reg = /([^?&=]+)=([^?&=]*)/g - search.replace(reg, (rs, $1, $2) => { - const name = decodeURIComponent($1) - let val = decodeURIComponent($2) - val = String(val) - obj[name] = val - return rs - }) - return obj + url = url == null ? window.location.href : url + const search = url.substring(url.lastIndexOf('?') + 1) + const obj = {} + const reg = /([^?&=]+)=([^?&=]*)/g + search.replace(reg, (rs, $1, $2) => { + const name = decodeURIComponent($1) + let val = decodeURIComponent($2) + val = String(val) + obj[name] = val + return rs + }) + return obj } /** @@ -82,15 +109,15 @@ export function getQueryObject(url) { * @returns {number} output value */ export function byteLength(str) { - // returns the byte length of an utf8 string - let s = str.length - for (var i = str.length - 1; i >= 0; i--) { - const code = str.charCodeAt(i) - if (code > 0x7f && code <= 0x7ff) s++ - else if (code > 0x7ff && code <= 0xffff) s += 2 - if (code >= 0xDC00 && code <= 0xDFFF) i-- - } - return s + // returns the byte length of an utf8 string + let s = str.length + for (var i = str.length - 1; i >= 0; i--) { + const code = str.charCodeAt(i) + if (code > 0x7f && code <= 0x7ff) s++ + else if (code > 0x7ff && code <= 0xffff) s += 2 + if (code >= 0xDC00 && code <= 0xDFFF) i-- + } + return s } /** @@ -98,13 +125,13 @@ export function byteLength(str) { * @returns {Array} */ export function cleanArray(actual) { - const newArray = [] - for (let i = 0; i < actual.length; i++) { - if (actual[i]) { - newArray.push(actual[i]) + const newArray = [] + for (let i = 0; i < actual.length; i++) { + if (actual[i]) { + newArray.push(actual[i]) + } } - } - return newArray + return newArray } /** @@ -112,13 +139,13 @@ export function cleanArray(actual) { * @returns {Array} */ export function param(json) { - if (!json) return '' - return cleanArray( - Object.keys(json).map(key => { - if (json[key] === undefined) return '' - return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) - }) - ).join('&') + if (!json) return '' + return cleanArray( + Object.keys(json).map(key => { + if (json[key] === undefined) return '' + return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) + }) + ).join('&') } /** @@ -126,21 +153,21 @@ export function param(json) { * @returns {Object} */ export function param2Obj(url) { - const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') - if (!search) { - return {} - } - const obj = {} - const searchArr = search.split('&') - searchArr.forEach(v => { - const index = v.indexOf('=') - if (index !== -1) { - const name = v.substring(0, index) - const val = v.substring(index + 1, v.length) - obj[name] = val + const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') + if (!search) { + return {} } - }) - return obj + const obj = {} + const searchArr = search.split('&') + searchArr.forEach(v => { + const index = v.indexOf('=') + if (index !== -1) { + const name = v.substring(0, index) + const val = v.substring(index + 1, v.length) + obj[name] = val + } + }) + return obj } /** @@ -148,9 +175,9 @@ export function param2Obj(url) { * @returns {string} */ export function html2Text(val) { - const div = document.createElement('div') - div.innerHTML = val - return div.textContent || div.innerText + const div = document.createElement('div') + div.innerHTML = val + return div.textContent || div.innerText } /** @@ -160,21 +187,21 @@ export function html2Text(val) { * @returns {Object} */ export function objectMerge(target, source) { - if (typeof target !== 'object') { - target = {} - } - if (Array.isArray(source)) { - return source.slice() - } - Object.keys(source).forEach(property => { - const sourceProperty = source[property] - if (typeof sourceProperty === 'object') { - target[property] = objectMerge(target[property], sourceProperty) - } else { - target[property] = sourceProperty + if (typeof target !== 'object') { + target = {} + } + if (Array.isArray(source)) { + return source.slice() } - }) - return target + Object.keys(source).forEach(property => { + const sourceProperty = source[property] + if (typeof sourceProperty === 'object') { + target[property] = objectMerge(target[property], sourceProperty) + } else { + target[property] = sourceProperty + } + }) + return target } /** @@ -182,19 +209,19 @@ export function objectMerge(target, source) { * @param {string} className */ export function toggleClass(element, className) { - if (!element || !className) { - return - } - let classString = element.className - const nameIndex = classString.indexOf(className) - if (nameIndex === -1) { - classString += '' + className - } else { - classString = - classString.substr(0, nameIndex) + - classString.substr(nameIndex + className.length) - } - element.className = classString + if (!element || !className) { + return + } + let classString = element.className + const nameIndex = classString.indexOf(className) + if (nameIndex === -1) { + classString += '' + className + } else { + classString = + classString.substr(0, nameIndex) + + classString.substr(nameIndex + className.length) + } + element.className = classString } /** @@ -202,11 +229,11 @@ export function toggleClass(element, className) { * @returns {Date} */ export function getTime(type) { - if (type === 'start') { - return new Date().getTime() - 3600 * 1000 * 24 * 90 - } else { - return new Date(new Date().toDateString()) - } + if (type === 'start') { + return new Date().getTime() - 3600 * 1000 * 24 * 90 + } else { + return new Date(new Date().toDateString()) + } } /** @@ -216,38 +243,38 @@ export function getTime(type) { * @return {*} */ export function debounce(func, wait, immediate) { - let timeout, args, context, timestamp, result + let timeout, args, context, timestamp, result - const later = function() { - // 据上一次触发时间间隔 - const last = +new Date() - timestamp + const later = function () { + // 据上一次触发时间间隔 + const last = +new Date() - timestamp - // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait - if (last < wait && last > 0) { - timeout = setTimeout(later, wait - last) - } else { - timeout = null - // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 - if (!immediate) { - result = func.apply(context, args) - if (!timeout) context = args = null - } - } - } - - return function(...args) { - context = this - timestamp = +new Date() - const callNow = immediate && !timeout - // 如果延时不存在,重新设定延时 - if (!timeout) timeout = setTimeout(later, wait) - if (callNow) { - result = func.apply(context, args) - context = args = null + // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait + if (last < wait && last > 0) { + timeout = setTimeout(later, wait - last) + } else { + timeout = null + // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 + if (!immediate) { + result = func.apply(context, args) + if (!timeout) context = args = null + } + } } - return result - } + return function (...args) { + context = this + timestamp = +new Date() + const callNow = immediate && !timeout + // 如果延时不存在,重新设定延时 + if (!timeout) timeout = setTimeout(later, wait) + if (callNow) { + result = func.apply(context, args) + context = args = null + } + + return result + } } /** @@ -258,18 +285,18 @@ export function debounce(func, wait, immediate) { * @returns {Object} */ export function deepClone(source) { - if (!source && typeof source !== 'object') { - throw new Error('error arguments', 'deepClone') - } - const targetObj = source.constructor === Array ? [] : {} - Object.keys(source).forEach(keys => { - if (source[keys] && typeof source[keys] === 'object') { - targetObj[keys] = deepClone(source[keys]) - } else { - targetObj[keys] = source[keys] + if (!source && typeof source !== 'object') { + throw new Error('error arguments', 'deepClone') } - }) - return targetObj + const targetObj = source.constructor === Array ? [] : {} + Object.keys(source).forEach(keys => { + if (source[keys] && typeof source[keys] === 'object') { + targetObj[keys] = deepClone(source[keys]) + } else { + targetObj[keys] = source[keys] + } + }) + return targetObj } /** @@ -277,16 +304,16 @@ export function deepClone(source) { * @returns {Array} */ export function uniqueArr(arr) { - return Array.from(new Set(arr)) + return Array.from(new Set(arr)) } /** * @returns {string} */ export function createUniqueString() { - const timestamp = +new Date() + '' - const randomNum = parseInt((1 + Math.random()) * 65536) + '' - return (+(randomNum + timestamp)).toString(32) + const timestamp = +new Date() + '' + const randomNum = parseInt((1 + Math.random()) * 65536) + '' + return (+(randomNum + timestamp)).toString(32) } /** @@ -296,7 +323,7 @@ export function createUniqueString() { * @returns {boolean} */ export function hasClass(ele, cls) { - return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) + return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) } /** @@ -305,7 +332,7 @@ export function hasClass(ele, cls) { * @param {string} cls */ export function addClass(ele, cls) { - if (!hasClass(ele, cls)) ele.className += ' ' + cls + if (!hasClass(ele, cls)) ele.className += ' ' + cls } /** @@ -314,77 +341,77 @@ export function addClass(ele, cls) { * @param {string} cls */ export function removeClass(ele, cls) { - if (hasClass(ele, cls)) { - const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') - ele.className = ele.className.replace(reg, ' ') - } + if (hasClass(ele, cls)) { + const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') + ele.className = ele.className.replace(reg, ' ') + } } export function makeMap(str, expectsLowerCase) { - const map = Object.create(null) - const list = str.split(',') - for (let i = 0; i < list.length; i++) { - map[list[i]] = true - } - return expectsLowerCase - ? val => map[val.toLowerCase()] - : val => map[val] + const map = Object.create(null) + const list = str.split(',') + for (let i = 0; i < list.length; i++) { + map[list[i]] = true + } + return expectsLowerCase + ? val => map[val.toLowerCase()] + : val => map[val] } export const exportDefault = 'export default ' export const beautifierConf = { - html: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'separate', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: false, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - }, - js: { - indent_size: '2', - indent_char: ' ', - max_preserve_newlines: '-1', - preserve_newlines: false, - keep_array_indentation: false, - break_chained_methods: false, - indent_scripts: 'normal', - brace_style: 'end-expand', - space_before_conditional: true, - unescape_strings: false, - jslint_happy: true, - end_with_newline: true, - wrap_line_length: '110', - indent_inner_html: true, - comma_first: false, - e4x: true, - indent_empty_lines: true - } + html: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'separate', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: false, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + }, + js: { + indent_size: '2', + indent_char: ' ', + max_preserve_newlines: '-1', + preserve_newlines: false, + keep_array_indentation: false, + break_chained_methods: false, + indent_scripts: 'normal', + brace_style: 'end-expand', + space_before_conditional: true, + unescape_strings: false, + jslint_happy: true, + end_with_newline: true, + wrap_line_length: '110', + indent_inner_html: true, + comma_first: false, + e4x: true, + indent_empty_lines: true + } } // 首字母大小 export function titleCase(str) { - return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) + return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) } // 下划转驼峰 export function camelCase(str) { - return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) + return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) } export function isNumberStr(str) { - return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) + return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) } diff --git a/src/utils/request.js b/src/utils/request.js index 3e0acccf..7c289efd 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -34,8 +34,8 @@ service.interceptors.request.use(config => { config.headers = { - ADMIN_ID: getAdminId(), - ADMIN_TOKEN: getToken() + ADMINID: getAdminId(), + ADMINTOKEN: getToken() }; @@ -50,11 +50,11 @@ service.interceptors.request.use(config => { if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { const requestObj = { url: config.url, - data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data, + data: typeof config.data === 'Object' ? JSON.stringify(config.data) : config.data, time: new Date().getTime() } const sessionObj = cache.session.getJSON('sessionObj') - if (sessionObj === undefined || sessionObj === null || sessionObj === '') { + if (!sessionObj) { cache.session.setJSON('sessionObj', requestObj) } else { const s_url = sessionObj.url; // 请求地址 diff --git a/src/views/basic/busType/bussinessType.vue b/src/views/basic/busType/bussinessType.vue index f9fff659..11969171 100644 --- a/src/views/basic/busType/bussinessType.vue +++ b/src/views/basic/busType/bussinessType.vue @@ -1,7 +1,7 @@