diff --git a/src/router/index.js b/src/router/index.js index 92b263f..701d948 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -9,9 +9,9 @@ import Router from 'vue-router' import { apiGetMenuNav } from '@/api/api_menu' import { isURL } from '@/utils/validate' import {clearLoginInfo} from '@/utils' -//import VConsole from 'vconsole' +import VConsole from 'vconsole' -//let vConsole = new VConsole() +let vConsole = new VConsole() Vue.use(Router) // 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载 @@ -135,7 +135,7 @@ router.beforeEach((to, from, next) => { //next() } else { apiGetMenuNav({}).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { fnAddDynamicMenuRoutes(res.menuList) router.options.isAddDynamicMenuRoutes = true sessionStorage.setItem('menuList', JSON.stringify(res.menuList || '[]')) diff --git a/src/views/common/dingtalklogin.vue b/src/views/common/dingtalklogin.vue index 186dab5..b0a0541 100644 --- a/src/views/common/dingtalklogin.vue +++ b/src/views/common/dingtalklogin.vue @@ -63,7 +63,7 @@ export default { apiDingtalkJump(this.req).then(res => { console.log(res) - if (res && res.code === 0) { + if (res && res.code == 200) { console.log('获取token') this.$cookie.set('token', res.token) window.location.href=this.$route.query.url @@ -123,7 +123,7 @@ export default { console.log('获取登录结果') console.log(res) this.hasSendCode = false - if (res && res.code === 0) { + if (res && res.code == 200) { console.log('获取token') this.$cookie.set('token', res.token) this.dataForm.verify='登录成功,跳转中...' diff --git a/src/views/common/dingtalkluck.vue b/src/views/common/dingtalkluck.vue index f178fcb..fdb448a 100644 --- a/src/views/common/dingtalkluck.vue +++ b/src/views/common/dingtalkluck.vue @@ -83,7 +83,7 @@ export default { console.log('获取登录结果') console.log(res) this.hasSendCode = false - if (res && res.code === 0) { + if (res && res.code == 200) { console.log('获取token') this.dataForm.verify = '已经登记,祝您好运!七夕下午5点20分员工新天地现场开奖' diff --git a/src/views/common/login.vue b/src/views/common/login.vue index f7ed2fa..d1ca60f 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -110,7 +110,7 @@ export default { this.isloading = true apiLogin(param).then(res => { this.isloading = false - if (res && res.code === 0) { + if (res && res.code == 200) { console.log('获取token') this.$cookie.set('token', res.token) console.log('保存token') @@ -143,7 +143,7 @@ export default { uuid: this.dataForm.uuid } apiSsysSendSMS(parmse).then(res => { - if (res.code === 0) { + if (res.code == 200) { this.time = 60 this.hasSendCode = true this.timer = setInterval(() => { diff --git a/src/views/common/lzluck.vue b/src/views/common/lzluck.vue index 1281d0e..0dee550 100644 --- a/src/views/common/lzluck.vue +++ b/src/views/common/lzluck.vue @@ -97,7 +97,7 @@ export default { this.hasSendCode = true; apiUpdateLuck(this.luckdata).then(res => { console.log(res) - if (res && res.code === 0) { + if (res && res.code == 200) { console.log(res.luck) this.requst = res.luck if(res.luck.isFinish === 1){ @@ -117,7 +117,7 @@ export default { apiGetLuck(this.query).then(res => { console.log(res) - if (res && res.code === 0) { + if (res && res.code == 200) { console.log('获取token') if(res.luck.isFinish === 0){ this.requst = res.luck diff --git a/src/views/layout/main-navbar-update-password.vue b/src/views/layout/main-navbar-update-password.vue index 77c607f..0b5b0b7 100644 --- a/src/views/layout/main-navbar-update-password.vue +++ b/src/views/layout/main-navbar-update-password.vue @@ -90,7 +90,7 @@ 'password': this.dataForm.password, 'newPassword': this.dataForm.newPassword }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/layout/main-navbar.vue b/src/views/layout/main-navbar.vue index 9b90e39..3717a1e 100644 --- a/src/views/layout/main-navbar.vue +++ b/src/views/layout/main-navbar.vue @@ -103,7 +103,7 @@ type: 'warning' }).then(() => { apiLogout({}).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { clearLoginInfo() this.$router.push({ name: 'login' }) } diff --git a/src/views/layout/main.vue b/src/views/layout/main.vue index 177e1f6..c3cfa6e 100644 --- a/src/views/layout/main.vue +++ b/src/views/layout/main.vue @@ -90,7 +90,7 @@ export default { // 获取当前登录用户的信息 handleGetUserInfo () { apiGetUserInfo({}, '').then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.loading = false this.userId = res.user && res.user.id this.userName = res.user && res.user.userName diff --git a/src/views/modules/device-manage/device-brand-detail.vue b/src/views/modules/device-manage/device-brand-detail.vue index e43a723..fade831 100644 --- a/src/views/modules/device-manage/device-brand-detail.vue +++ b/src/views/modules/device-manage/device-brand-detail.vue @@ -124,7 +124,7 @@ export default { if(this.isAdd){ apiAddDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('添加成功') this.$emit('refreshDataList') @@ -135,7 +135,7 @@ export default { } else { apiEditDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('更新成功') this.$emit('refreshDataList') diff --git a/src/views/modules/device-manage/device-brand.vue b/src/views/modules/device-manage/device-brand.vue index 35df6b0..670a147 100644 --- a/src/views/modules/device-manage/device-brand.vue +++ b/src/views/modules/device-manage/device-brand.vue @@ -165,7 +165,7 @@ export default { rank: null, }).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message('删除成功') this.getData() } else { @@ -181,7 +181,7 @@ export default { this.dataListLoading = true apiGetDeviceBrandList(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.rows; this.totalPage = data.total this.types = data.types diff --git a/src/views/modules/device-manage/device-list-detail.vue b/src/views/modules/device-manage/device-list-detail.vue index b664fdb..844a3de 100644 --- a/src/views/modules/device-manage/device-list-detail.vue +++ b/src/views/modules/device-manage/device-list-detail.vue @@ -198,7 +198,7 @@ export default { console.log("editSpecs"); apiEditUseDevice(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false; this.$message("更新成功"); this.$emit("refreshDataList"); diff --git a/src/views/modules/device-manage/device-list.vue b/src/views/modules/device-manage/device-list.vue index 4f39934..6912142 100644 --- a/src/views/modules/device-manage/device-list.vue +++ b/src/views/modules/device-manage/device-list.vue @@ -318,7 +318,7 @@ export default { this.dataListLoading = true; apiGetUseDeviceList(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.rows; this.totalPage = data.total; this.types = data.types; @@ -333,7 +333,7 @@ export default { getBrands() { apiGetDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.brands = data.brands; this.btnSearch() } else { @@ -373,7 +373,7 @@ export default { handlePrint(val) { apiGetRePrintCode({}, val.code).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message("发送打印请求成功"); } else { this.$message.error("发送打印请求失败!" + data.msg); @@ -416,7 +416,7 @@ export default { other: null }).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message("删除成功"); this.getData(); } else { diff --git a/src/views/modules/device-manage/device-onecode.vue b/src/views/modules/device-manage/device-onecode.vue index b1b158a..bee53e9 100644 --- a/src/views/modules/device-manage/device-onecode.vue +++ b/src/views/modules/device-manage/device-onecode.vue @@ -113,7 +113,7 @@ export default { } apiGetNewPrintCodes({}, this.newCount).then((data) => { console.log(data) - if (data && data.code === 0) { + if (data && data.code == 200) { this.getData() this.$message('发送打印请求成功') } else { @@ -143,7 +143,7 @@ export default { handlePrint (val) { apiGetRePrintCode({}, val.code).then((data) => { console.log(data) - if (data && data.code === 0) { + if (data && data.code == 200) { this.getData() this.$message('发送打印请求成功') @@ -160,7 +160,7 @@ export default { this.dataListLoading = true apiGetCodes(this.specReq).then((data) => { console.log(data) - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.codes.list this.totalPage = data.codes.totalCount } else { diff --git a/src/views/modules/device-manage/device-spec-detail.vue b/src/views/modules/device-manage/device-spec-detail.vue index 0f1fbca..d5c73f4 100644 --- a/src/views/modules/device-manage/device-spec-detail.vue +++ b/src/views/modules/device-manage/device-spec-detail.vue @@ -141,7 +141,7 @@ export default { getBrands(){ apiGetDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.brands = data.brands this.brands.splice(0, 1); } else { @@ -193,7 +193,7 @@ export default { if(this.isAdd){ apiAddDeviceSpecs(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('添加成功') this.$emit('refreshDataList') @@ -204,7 +204,7 @@ export default { } else { apiEditDeviceSpecs(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('更新成功') this.$emit('refreshDataList') diff --git a/src/views/modules/device-manage/device-spec.vue b/src/views/modules/device-manage/device-spec.vue index 872a361..303ee60 100644 --- a/src/views/modules/device-manage/device-spec.vue +++ b/src/views/modules/device-manage/device-spec.vue @@ -193,7 +193,7 @@ export default { remark: null, used: 0}).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message('删除成功') this.getData() } else { @@ -209,7 +209,7 @@ export default { this.dataListLoading = true apiGetDeviceSpecs(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.rows; this.totalPage = data.total this.types = data.types @@ -222,7 +222,7 @@ export default { getBrands(){ apiGetDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.brands = data.brands this.specReq.page = 1 this.getData() diff --git a/src/views/modules/device-manage/device-tcounts.vue b/src/views/modules/device-manage/device-tcounts.vue index cbf6543..1733bca 100644 --- a/src/views/modules/device-manage/device-tcounts.vue +++ b/src/views/modules/device-manage/device-tcounts.vue @@ -79,7 +79,7 @@ export default { addNewSpec(){ apiAddTCounts().then((data) =>{ - if(data.code == 0){ + if(data.code == 200){ this.$message(data.msg) this.specReq.page = 1 this.getData() @@ -133,7 +133,7 @@ export default { count:null }).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message('删除成功') this.getData() } else { @@ -149,7 +149,7 @@ export default { this.dataListLoading = true apiGetTCounts(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.rows.list; this.totalPage = data.rows.totalCount } else { diff --git a/src/views/modules/device-manage/device-type-detail.vue b/src/views/modules/device-manage/device-type-detail.vue index 0b4b9ef..5502662 100644 --- a/src/views/modules/device-manage/device-type-detail.vue +++ b/src/views/modules/device-manage/device-type-detail.vue @@ -97,7 +97,7 @@ export default { if(this.isAdd){ apiAddDeviceTypes(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('添加成功') this.$emit('refreshDataList') @@ -108,7 +108,7 @@ export default { } else { apiEditDeviceTypes(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.visible = false this.$message('更新成功') this.$emit('refreshDataList') diff --git a/src/views/modules/device-manage/device-type.vue b/src/views/modules/device-manage/device-type.vue index c616c78..8f5f5b8 100644 --- a/src/views/modules/device-manage/device-type.vue +++ b/src/views/modules/device-manage/device-type.vue @@ -156,7 +156,7 @@ export default { rank: null //排序 }).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message('删除成功') this.getData() } else { @@ -172,7 +172,7 @@ export default { this.dataListLoading = true apiGetDeviceTypes(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.rows; this.totalPage = data.total this.types = data.types @@ -185,7 +185,7 @@ export default { getBrands(){ apiGetDeviceBrands(this.specReq).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.brands = data.brands this.specReq.page = 1 this.getData() diff --git a/src/views/modules/device-manage/index.vue b/src/views/modules/device-manage/index.vue index 3d2e86e..a067760 100644 --- a/src/views/modules/device-manage/index.vue +++ b/src/views/modules/device-manage/index.vue @@ -56,7 +56,7 @@ export default { setTimeout(() => { loading.close() }, 500) - if (result.code === 0) { + if (result.code == 200) { this.dataInfo = result.data } else { this.$message.error(result.mgs) diff --git a/src/views/modules/device/device-detail.vue b/src/views/modules/device/device-detail.vue index c88577b..1ce18e4 100644 --- a/src/views/modules/device/device-detail.vue +++ b/src/views/modules/device/device-detail.vue @@ -305,7 +305,7 @@ export default { this.dataListLoading = true; apiChangeEquipment(this.deviceInfo).then((data) => { console.log(data.data); - if (data.code == 0) { + if (data.code == 200) { if(this.$route.query.type == 4){ this.$message("回收成功"); this.btnOpt = 0; @@ -390,7 +390,7 @@ export default { apiFindEquipmentByCode({}, this.deviceInfo.code).then((data) => { console.log(data); - if (data.code == 0) { + if (data.code == 200) { if (typeof data.data == "undefined") { this.$message("未绑定设备"); } else { diff --git a/src/views/modules/device/device-staff-device.vue b/src/views/modules/device/device-staff-device.vue index 3b2dad4..e69f93e 100644 --- a/src/views/modules/device/device-staff-device.vue +++ b/src/views/modules/device/device-staff-device.vue @@ -101,7 +101,7 @@ export default { this.dataListLoading = true; apiFindStaffDevice(this.findEqInfo).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.findEqInfo.list = [...this.findEqInfo.list, ...data.data.list] this.findEqInfo.currPage = data.data.currPage this.findEqInfo.totalPage = data.data.totalPage @@ -131,7 +131,7 @@ export default { this.getData() /*apiFindStaffDevice(this.findEqInfo).then((data) => { console.log(data); - if (data && data.code === 0) { + if (data && data.code == 200) { this.findEqInfo.list = [...this.findEqInfo.list, ...data.data.list] this.findEqInfo.currPage = data.data.currPage this.findEqInfo.totalPage = data.data.totalPage diff --git a/src/views/modules/device/device-type.vue b/src/views/modules/device/device-type.vue index 0e6a2a0..7700112 100644 --- a/src/views/modules/device/device-type.vue +++ b/src/views/modules/device/device-type.vue @@ -85,7 +85,7 @@ export default { 'categorys': this.categorys }).then(data => { console.log(data) - if (data && data.code === 0) { + if (data && data.code == 200) { this.data = data.data } else { this.data = [] diff --git a/src/views/modules/job/schedule-add-or-update.vue b/src/views/modules/job/schedule-add-or-update.vue index 5b19fdb..1c5a10a 100644 --- a/src/views/modules/job/schedule-add-or-update.vue +++ b/src/views/modules/job/schedule-add-or-update.vue @@ -60,7 +60,7 @@ // 编辑 handleEdit () { apiSysScheduleInfo({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataForm.beanName = res.schedule.beanName this.dataForm.params = res.schedule.params this.dataForm.cronExpression = res.schedule.cronExpression @@ -82,7 +82,7 @@ 'status': !this.dataForm.id ? undefined : this.dataForm.status } apiSysScheduleConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/job/schedule-log.vue b/src/views/modules/job/schedule-log.vue index 8d406e2..0e21d38 100644 --- a/src/views/modules/job/schedule-log.vue +++ b/src/views/modules/job/schedule-log.vue @@ -75,7 +75,7 @@ export default { 'limit': this.pageSize, 'jobId': this.dataForm.id }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -99,7 +99,7 @@ export default { // 失败信息 handleShowErrorInfo (id) { apiSysScheduleLogInfo({}, `/${id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$alert(res.log.error) } else { this.$message.error(res.msg) diff --git a/src/views/modules/job/schedule.vue b/src/views/modules/job/schedule.vue index 41ec1f5..50b64e7 100644 --- a/src/views/modules/job/schedule.vue +++ b/src/views/modules/job/schedule.vue @@ -144,7 +144,7 @@ export default { 'limit': this.pageSize, 'beanName': this.dataForm.beanName }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -187,7 +187,7 @@ export default { type: 'warning' }).then(() => { apiSysScheduleDelete(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', @@ -213,7 +213,7 @@ export default { type: 'warning' }).then(() => { apiSysSchedulePause(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', @@ -239,7 +239,7 @@ export default { type: 'warning' }).then(() => { apiSysScheduleResume(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', @@ -265,7 +265,7 @@ export default { type: 'warning' }).then(() => { apiSysScheduleRun(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/oss/oss-config.vue b/src/views/modules/oss/oss-config.vue index 9201051..906a47c 100644 --- a/src/views/modules/oss/oss-config.vue +++ b/src/views/modules/oss/oss-config.vue @@ -97,7 +97,7 @@ init (id) { this.visible = true apiSysOssConfig({}).then(res => { - this.dataForm = res && res.code === 0 ? res.config : [] + this.dataForm = res && res.code == 200 ? res.config : [] }) }, // 表单提交 @@ -105,7 +105,7 @@ this.$refs['dataForm'].validate((valid) => { if (valid) { apiSysOssSaveConfig(this.dataForm).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/oss/oss-upload.vue b/src/views/modules/oss/oss-upload.vue index d4d90f9..8fcca99 100644 --- a/src/views/modules/oss/oss-upload.vue +++ b/src/views/modules/oss/oss-upload.vue @@ -47,7 +47,7 @@ handleSuccess (response, file, fileList) { this.fileList = fileList this.successNum++ - if (response && response.code === 0) { + if (response && response.code == 200) { if (this.num === this.successNum) { this.$confirm('操作成功, 是否继续操作?', '提示', { confirmButtonText: '确定', diff --git a/src/views/modules/oss/oss.vue b/src/views/modules/oss/oss.vue index 0ee878d..f657439 100644 --- a/src/views/modules/oss/oss.vue +++ b/src/views/modules/oss/oss.vue @@ -83,7 +83,7 @@ export default { 'page': this.pageIndex, 'limit': this.pageSize }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -133,7 +133,7 @@ export default { type: 'warning' }).then(() => { apiSysOssDelete(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/chart/index.vue b/src/views/modules/result/chart/index.vue index ab0286b..580cf04 100644 --- a/src/views/modules/result/chart/index.vue +++ b/src/views/modules/result/chart/index.vue @@ -54,7 +54,7 @@ export default { setTimeout(() => { loading.close() }, 500) - if (result && result.code === 0) { + if (result && result.code == 200) { this.dataInfo = result.data } else { this.$message.error(result.msg) diff --git a/src/views/modules/result/distribution/index.vue b/src/views/modules/result/distribution/index.vue index 8e33846..c189ca5 100644 --- a/src/views/modules/result/distribution/index.vue +++ b/src/views/modules/result/distribution/index.vue @@ -182,7 +182,7 @@ 'departmentId': this.departmentId, 'selectMonthTime': this.selectMonthTime }).then(res => { - if (res && res.code === 0 && res.page) { + if (res && res.code == 200 && res.page) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { diff --git a/src/views/modules/result/record/approval-add-or-update.vue b/src/views/modules/result/record/approval-add-or-update.vue index e5b2889..ce592ee 100644 --- a/src/views/modules/result/record/approval-add-or-update.vue +++ b/src/views/modules/result/record/approval-add-or-update.vue @@ -65,7 +65,7 @@ export default { } this.resultCommentEditor.txt.html('

') const data = await getResultComment(this.recordResultId) - if (data && data.code === 0) { + if (data && data.code == 200) { this.resultCommitId = data.resultComment.id this.rollbackData = data.list if (this.keyResultEditor !== null) { @@ -90,7 +90,7 @@ export default { 'status': status, 'resultCommitId': this.resultCommitId }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$emit('refreshDataList', this.recordResultId) this.alertInfo('更新成功') } else { diff --git a/src/views/modules/result/record/date-add-or-update.vue b/src/views/modules/result/record/date-add-or-update.vue index c149bc7..99db2dc 100644 --- a/src/views/modules/result/record/date-add-or-update.vue +++ b/src/views/modules/result/record/date-add-or-update.vue @@ -51,7 +51,7 @@ export default { getMyDate({ 'recordResultId': this.recordResultId }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.list this.dataForm.monthTime = this.dataList[0].value } else { @@ -74,7 +74,7 @@ export default { 'recordResultId': this.recordResultId, 'monthTime': this.dataForm.monthTime }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$emit('refreshDataList', this.recordResultId) this.visible = false this.alertInfo('更新成功') diff --git a/src/views/modules/result/record/lzresultrecord-add-or-update.vue b/src/views/modules/result/record/lzresultrecord-add-or-update.vue index 6f8473f..6532189 100644 --- a/src/views/modules/result/record/lzresultrecord-add-or-update.vue +++ b/src/views/modules/result/record/lzresultrecord-add-or-update.vue @@ -92,7 +92,7 @@ method: 'get', params: this.$http.adornParams() }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataForm.isDelete = data.lzresultrecord.isDelete this.dataForm.gmtCreate = data.lzresultrecord.gmtCreate this.dataForm.gmtModified = data.lzresultrecord.gmtModified @@ -125,7 +125,7 @@ 'remark': this.dataForm.remark }) }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/record/lzresultrecord.vue b/src/views/modules/result/record/lzresultrecord.vue index c4a2566..f1ec76e 100644 --- a/src/views/modules/result/record/lzresultrecord.vue +++ b/src/views/modules/result/record/lzresultrecord.vue @@ -230,7 +230,7 @@ export default { departmentQuery({ 'departmentId': departmentId }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this['departmentList' + i] = data.departmentList if (i === '2') { this.dataForm['department2'] = '' @@ -268,7 +268,7 @@ export default { 'remark': this.dataForm.remark, 'isSelf': 1 }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount this.departmentList1 = data.departmentList1 @@ -307,7 +307,7 @@ export default { await addRecordAjudex({ 'type': recordType }).then(data => { - if (data && data.code !== 0) { + if (data && data.code !== 200) { flag = true this.$message({ message: data.msg, @@ -347,7 +347,7 @@ export default { deleteRecord({ 'ids': ids.join(',') }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.getDataList() this.$message({ message: data.msg, diff --git a/src/views/modules/result/record/lzresultrecordapp.vue b/src/views/modules/result/record/lzresultrecordapp.vue index 8afef62..ded94e3 100644 --- a/src/views/modules/result/record/lzresultrecordapp.vue +++ b/src/views/modules/result/record/lzresultrecordapp.vue @@ -318,7 +318,7 @@ export default { departmentQuery({ 'departmentId': departmentId }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this['departmentList' + i] = data.departmentList if (i === '2') { this.dataForm['department2'] = '' @@ -355,7 +355,7 @@ export default { 'isSelf': 2, 'isChangeDepartmentrtment': this.isChangeDepartmentrtment }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount this.departmentLevel = data.departmentLevel @@ -440,7 +440,7 @@ export default { method: 'post', data: this.$http.adornData(ids, false) }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/record/recorddetail-add-or-update.vue b/src/views/modules/result/record/recorddetail-add-or-update.vue index a7bd4b4..fed7c4d 100644 --- a/src/views/modules/result/record/recorddetail-add-or-update.vue +++ b/src/views/modules/result/record/recorddetail-add-or-update.vue @@ -78,7 +78,7 @@ export default { 'type': this.type, 'id': this.dataForm.id }) - if (data && data.code !== 0) { + if (data && data.code !== 200) { callback(new Error(data.msg)) } callback() @@ -180,7 +180,7 @@ export default { 'type': this.type, 'id': this.dataForm.id }) - if (data && data.code !== 0) { + if (data && data.code !== 200) { this.$message({ message: data.msg, type: 'success', @@ -240,7 +240,7 @@ export default { if (this.dataForm.id && this.dataForm.id > 0) { const data = await apiDetailInfo(this.dataForm.id) - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataForm = data.detailInfo if (this.keyResultEditor !== null) { this.keyResultEditor.txt.html(this.dataForm.keyResult || '') @@ -306,7 +306,7 @@ export default { 'type': this.type, 'id': this.dataForm.id }) - if (data && data.code !== 0) { + if (data && data.code !== 200) { this.alertInfo(data.msg) return } @@ -360,7 +360,7 @@ export default { 'recordType': this.recordType, 'priority': priority1 }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', @@ -387,7 +387,7 @@ export default { return } const data = await recorddetailDelete(this.dataForm.id) - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '删除成功', type: 'success', diff --git a/src/views/modules/result/record/recorddetail.vue b/src/views/modules/result/record/recorddetail.vue index 853dc0b..3faba25 100644 --- a/src/views/modules/result/record/recorddetail.vue +++ b/src/views/modules/result/record/recorddetail.vue @@ -221,7 +221,7 @@ export default { 'recordResultId': id, 'recordType': this.recordType }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.clientHeight = window.innerHeight - 50 this.tableData = data.list this.yeJiCheckNum = data.yeJiCheckNum @@ -291,7 +291,7 @@ export default { 'status': status }).then(data => { if (data) { - if (data.code === 0) { + if (data.code == 200) { this.getDataList() } this.$message({ diff --git a/src/views/modules/result/record/upload-add-or-update.vue b/src/views/modules/result/record/upload-add-or-update.vue index a4f35bc..ff3aca4 100644 --- a/src/views/modules/result/record/upload-add-or-update.vue +++ b/src/views/modules/result/record/upload-add-or-update.vue @@ -118,7 +118,7 @@ export default { 'limit': this.pageSize, 'recordId': this.recordResultId }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount } else { @@ -153,7 +153,7 @@ export default { deleteFile({ 'id': id }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.getDataList() this.$message({ message: data.msg, diff --git a/src/views/modules/result/report/index.vue b/src/views/modules/result/report/index.vue index ee92e3a..634417a 100644 --- a/src/views/modules/result/report/index.vue +++ b/src/views/modules/result/report/index.vue @@ -143,7 +143,7 @@ 'level': this.level, 'type': this.type }).then(res => { - if (res && res.code === 0 && res.page) { + if (res && res.code == 200 && res.page) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { diff --git a/src/views/modules/result/role/lzflowmanager-add-or-update.vue b/src/views/modules/result/role/lzflowmanager-add-or-update.vue index 19f5e09..a914f48 100644 --- a/src/views/modules/result/role/lzflowmanager-add-or-update.vue +++ b/src/views/modules/result/role/lzflowmanager-add-or-update.vue @@ -64,7 +64,7 @@ method: 'get', params: this.$http.adornParams() }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataForm.isDelete = data.lzflowmanager.isDelete this.dataForm.gmtCreate = data.lzflowmanager.gmtCreate this.dataForm.gmtModified = data.lzflowmanager.gmtModified @@ -89,7 +89,7 @@ 'name': this.dataForm.name }) }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/role/lzflowmanager.vue b/src/views/modules/result/role/lzflowmanager.vue index d2f6ef3..458883b 100644 --- a/src/views/modules/result/role/lzflowmanager.vue +++ b/src/views/modules/result/role/lzflowmanager.vue @@ -149,7 +149,7 @@ export default { 'limit': this.pageSize, 'name': this.dataForm.name }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount } else { @@ -181,7 +181,7 @@ export default { async handleGetTableList (id) { this.loading = true let result = await apiGetFlowInfo(this.query.staffId) - if (result.code === 0) { + if (result.code == 200) { this.tableData = result.page.list this.query.pageTotal = result.page.totalCount } else { @@ -226,7 +226,7 @@ export default { method: 'post', data: this.$http.adornData(ids, false) }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/role/lzrecordrole-add-or-update.vue b/src/views/modules/result/role/lzrecordrole-add-or-update.vue index 5d0e317..9f37a82 100644 --- a/src/views/modules/result/role/lzrecordrole-add-or-update.vue +++ b/src/views/modules/result/role/lzrecordrole-add-or-update.vue @@ -104,7 +104,7 @@ export default { // 编辑 handleEdit () { apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataForm = Object.assign({}, this.dataForm, res.role) var idx = res.role.menuIdList.indexOf(this.tempKey) if (idx !== -1) { @@ -132,7 +132,7 @@ export default { 'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys()) } apiSysRoleConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/role/lzrecordrole.vue b/src/views/modules/result/role/lzrecordrole.vue index 7c54bd2..dd2c5fa 100644 --- a/src/views/modules/result/role/lzrecordrole.vue +++ b/src/views/modules/result/role/lzrecordrole.vue @@ -107,7 +107,7 @@ export default { 'limit': this.pageSize, 'name': this.dataForm.name }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount } else { @@ -154,7 +154,7 @@ export default { method: 'post', data: this.$http.adornData(ids, false) }).then(({data}) => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/role/lzstaffrole-add-or-update.vue b/src/views/modules/result/role/lzstaffrole-add-or-update.vue index a996699..1080771 100644 --- a/src/views/modules/result/role/lzstaffrole-add-or-update.vue +++ b/src/views/modules/result/role/lzstaffrole-add-or-update.vue @@ -144,7 +144,7 @@ export default { // 获取数据列表 async getDataList () { const data = await apiSysRoleInfo(this.dataForm.id) - if (data && data.code === 0) { + if (data && data.code == 200) { this.staffs = data.staffs this.lzStaffRole = data.lzStaffRole this.dataForm.staffId = data.lzStaffRole.staffId @@ -173,7 +173,7 @@ export default { // 编辑 handleEdit () { apiSysRoleList({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataForm = Object.assign({}, this.dataForm, res.role) var idx = res.role.menuIdList.indexOf(this.tempKey) if (idx !== -1) { @@ -203,7 +203,7 @@ export default { 'resultRole': this.dataForm.resultRole } apiSysRoleConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/result/role/lzstaffrole.vue b/src/views/modules/result/role/lzstaffrole.vue index 673cda1..d5b2780 100644 --- a/src/views/modules/result/role/lzstaffrole.vue +++ b/src/views/modules/result/role/lzstaffrole.vue @@ -116,7 +116,7 @@ 'limit': this.pageSize, 'name': this.dataForm.name }).then(data => { - if (data && data.code === 0) { + if (data && data.code == 200) { this.dataList = data.page.list this.totalPage = data.page.totalCount } else { @@ -159,7 +159,7 @@ type: 'warning' }).then(() => { const data = apiDelete(id) - if (data && data.code === 0) { + if (data && data.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/staff/archives/index.vue b/src/views/modules/staff/archives/index.vue index 8909715..c59861f 100644 --- a/src/views/modules/staff/archives/index.vue +++ b/src/views/modules/staff/archives/index.vue @@ -173,7 +173,7 @@ export default { methods: { async getEmployeesInfo (data) { const result = await apiEmployeesInfo(data) - if (result.code === 0) { + if (result.code == 200) { this.activeName = 'first' this.dialogVisible = true this.employeesInfo = result.data @@ -196,7 +196,7 @@ export default { async handleGetTableList (id) { let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.limit })) - if (result.code === 0) { + if (result.code == 200) { this.tableData = result.page.list this.query.pageTotal = result.page.totalCount } else { diff --git a/src/views/modules/staff/manage/index.vue b/src/views/modules/staff/manage/index.vue index 2b485fb..61db0f2 100644 --- a/src/views/modules/staff/manage/index.vue +++ b/src/views/modules/staff/manage/index.vue @@ -215,7 +215,7 @@ export default { this.isUploading = true let result = await apiUploadFile(data) this.isUploading = false - if (result.code === 0) { + if (result.code == 200) { this.$message.success('上传成功!') } else { this.$message.error(result.msg) @@ -254,7 +254,7 @@ export default { this.dialogVisible = true // const result = await apiEmployeesInfo(data) - // if (result.code === 0) { + // if (result.code == 200) { // this.dialogVisible = true // this.employeesInfo = result.data // } else { @@ -279,7 +279,7 @@ export default { this.loading = true let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.limit })) console.log('result: ', result) - if (result.code === 0) { + if (result.code == 200) { this.tableData = result.page.list this.query.pageTotal = result.page.totalCount } else { diff --git a/src/views/modules/staff/profile/index.vue b/src/views/modules/staff/profile/index.vue index 4292543..4b984e0 100644 --- a/src/views/modules/staff/profile/index.vue +++ b/src/views/modules/staff/profile/index.vue @@ -61,7 +61,7 @@ export default { setTimeout(() => { loading.close() }, 500) - if (result.code === 0) { + if (result.code == 200) { this.dataInfo = result.data } else { this.$message.error(result.mgs) diff --git a/src/views/modules/sys/config/config-add-or-update.vue b/src/views/modules/sys/config/config-add-or-update.vue index d0435a9..a619f7d 100644 --- a/src/views/modules/sys/config/config-add-or-update.vue +++ b/src/views/modules/sys/config/config-add-or-update.vue @@ -54,7 +54,7 @@ }, handleEdit () { apiSysConfigInfo({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataForm.paramKey = res.config.paramKey this.dataForm.paramValue = res.config.paramValue this.dataForm.remark = res.config.remark @@ -72,7 +72,7 @@ 'remark': this.dataForm.remark } apiSysConfigConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/config/index.vue b/src/views/modules/sys/config/index.vue index cae894a..9750c9e 100644 --- a/src/views/modules/sys/config/index.vue +++ b/src/views/modules/sys/config/index.vue @@ -84,7 +84,7 @@ export default { 'limit': this.pageSize, 'paramKey': this.dataForm.paramKey }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -127,7 +127,7 @@ export default { type: 'warning' }).then(() => { apiSysConfigDelete(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/log.vue b/src/views/modules/sys/log.vue index f9dd9cb..86f236c 100644 --- a/src/views/modules/sys/log.vue +++ b/src/views/modules/sys/log.vue @@ -78,7 +78,7 @@ export default { 'limit': this.pageSize, 'key': this.dataForm.key }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { diff --git a/src/views/modules/sys/menu/index.vue b/src/views/modules/sys/menu/index.vue index 6ace013..6a1bf1e 100644 --- a/src/views/modules/sys/menu/index.vue +++ b/src/views/modules/sys/menu/index.vue @@ -117,7 +117,7 @@ export default { type: 'warning' }).then(() => { apiSysMenuDelete('', `/${id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/menu/menu-add-or-update.vue b/src/views/modules/sys/menu/menu-add-or-update.vue index 359e3dd..b82ef77 100644 --- a/src/views/modules/sys/menu/menu-add-or-update.vue +++ b/src/views/modules/sys/menu/menu-add-or-update.vue @@ -223,7 +223,7 @@ export default { 'icon': this.dataForm.icon } apiSysMenuConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/role/index.vue b/src/views/modules/sys/role/index.vue index 720e48e..d051e70 100644 --- a/src/views/modules/sys/role/index.vue +++ b/src/views/modules/sys/role/index.vue @@ -111,7 +111,7 @@ export default { 'limit': this.pageSize, 'roleName': this.dataForm.roleName }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -154,7 +154,7 @@ export default { type: 'warning' }).then(() => { apiSysRoleDelete(ids).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/role/role-add-or-update.vue b/src/views/modules/sys/role/role-add-or-update.vue index 8158ffd..0d7e8c9 100644 --- a/src/views/modules/sys/role/role-add-or-update.vue +++ b/src/views/modules/sys/role/role-add-or-update.vue @@ -118,7 +118,7 @@ export default { // 编辑 handleEdit () { apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataForm = Object.assign({}, this.dataForm, res.role) var idx = res.role.menuIdList.indexOf(this.tempKey) if (idx !== -1) { @@ -152,7 +152,7 @@ export default { 'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys()) } apiSysRoleConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/user/index.vue b/src/views/modules/sys/user/index.vue index fafdb3f..0ba4256 100644 --- a/src/views/modules/sys/user/index.vue +++ b/src/views/modules/sys/user/index.vue @@ -122,7 +122,7 @@ 'mobile': this.dataForm.mobile, 'roleName': this.dataForm.roleName }).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.dataList = res.page.list this.totalPage = res.page.totalCount } else { @@ -165,7 +165,7 @@ type: 'warning' }).then(() => { apiSysUserDelete(userIds).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success', diff --git a/src/views/modules/sys/user/user-add-or-update.vue b/src/views/modules/sys/user/user-add-or-update.vue index 1c35261..b3da50f 100644 --- a/src/views/modules/sys/user/user-add-or-update.vue +++ b/src/views/modules/sys/user/user-add-or-update.vue @@ -182,7 +182,7 @@ export default { // 获取角色选择列表 handleGetSysRoleSelect (id) { apiSysRoleSelect({}).then(res => { - this.roleList = res && res.code === 0 ? res.list : [] + this.roleList = res && res.code == 200 ? res.list : [] this.visible = true this.$nextTick(() => { this.$refs['dataForm'].resetFields() @@ -192,7 +192,7 @@ export default { // 编辑 handleEdit () { apiSysUserInfo({}, `/${this.dataForm.id}`).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$nextTick(() => { this.dataForm.username = res.user.username this.dataForm.realName = res.user.realName @@ -224,7 +224,7 @@ export default { 'roleIdList': this.dataForm.roleIdList } apiSysUserConfirm(params, this.apiType).then(res => { - if (res && res.code === 0) { + if (res && res.code == 200) { this.$message({ message: '操作成功', type: 'success',