code===0改成code == 200

This commit is contained in:
wulin 2020-11-06 14:31:37 +08:00
parent 8685489b58
commit 1f0878e6eb
57 changed files with 121 additions and 121 deletions

View File

@ -9,9 +9,9 @@ import Router from 'vue-router'
import { apiGetMenuNav } from '@/api/api_menu' import { apiGetMenuNav } from '@/api/api_menu'
import { isURL } from '@/utils/validate' import { isURL } from '@/utils/validate'
import {clearLoginInfo} from '@/utils' import {clearLoginInfo} from '@/utils'
//import VConsole from 'vconsole' import VConsole from 'vconsole'
//let vConsole = new VConsole() let vConsole = new VConsole()
Vue.use(Router) Vue.use(Router)
// 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载 // 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载
@ -135,7 +135,7 @@ router.beforeEach((to, from, next) => {
//next() //next()
} else { } else {
apiGetMenuNav({}).then(res => { apiGetMenuNav({}).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
fnAddDynamicMenuRoutes(res.menuList) fnAddDynamicMenuRoutes(res.menuList)
router.options.isAddDynamicMenuRoutes = true router.options.isAddDynamicMenuRoutes = true
sessionStorage.setItem('menuList', JSON.stringify(res.menuList || '[]')) sessionStorage.setItem('menuList', JSON.stringify(res.menuList || '[]'))

View File

@ -63,7 +63,7 @@ export default {
apiDingtalkJump(this.req).then(res => { apiDingtalkJump(this.req).then(res => {
console.log(res) console.log(res)
if (res && res.code === 0) { if (res && res.code == 200) {
console.log('获取token') console.log('获取token')
this.$cookie.set('token', res.token) this.$cookie.set('token', res.token)
window.location.href=this.$route.query.url window.location.href=this.$route.query.url
@ -123,7 +123,7 @@ export default {
console.log('获取登录结果') console.log('获取登录结果')
console.log(res) console.log(res)
this.hasSendCode = false this.hasSendCode = false
if (res && res.code === 0) { if (res && res.code == 200) {
console.log('获取token') console.log('获取token')
this.$cookie.set('token', res.token) this.$cookie.set('token', res.token)
this.dataForm.verify='登录成功,跳转中...' this.dataForm.verify='登录成功,跳转中...'

View File

@ -83,7 +83,7 @@ export default {
console.log('获取登录结果') console.log('获取登录结果')
console.log(res) console.log(res)
this.hasSendCode = false this.hasSendCode = false
if (res && res.code === 0) { if (res && res.code == 200) {
console.log('获取token') console.log('获取token')
this.dataForm.verify = '已经登记祝您好运七夕下午5点20分员工新天地现场开奖' this.dataForm.verify = '已经登记祝您好运七夕下午5点20分员工新天地现场开奖'

View File

@ -110,7 +110,7 @@ export default {
this.isloading = true this.isloading = true
apiLogin(param).then(res => { apiLogin(param).then(res => {
this.isloading = false this.isloading = false
if (res && res.code === 0) { if (res && res.code == 200) {
console.log('获取token') console.log('获取token')
this.$cookie.set('token', res.token) this.$cookie.set('token', res.token)
console.log('保存token') console.log('保存token')
@ -143,7 +143,7 @@ export default {
uuid: this.dataForm.uuid uuid: this.dataForm.uuid
} }
apiSsysSendSMS(parmse).then(res => { apiSsysSendSMS(parmse).then(res => {
if (res.code === 0) { if (res.code == 200) {
this.time = 60 this.time = 60
this.hasSendCode = true this.hasSendCode = true
this.timer = setInterval(() => { this.timer = setInterval(() => {

View File

@ -97,7 +97,7 @@ export default {
this.hasSendCode = true; this.hasSendCode = true;
apiUpdateLuck(this.luckdata).then(res => { apiUpdateLuck(this.luckdata).then(res => {
console.log(res) console.log(res)
if (res && res.code === 0) { if (res && res.code == 200) {
console.log(res.luck) console.log(res.luck)
this.requst = res.luck this.requst = res.luck
if(res.luck.isFinish === 1){ if(res.luck.isFinish === 1){
@ -117,7 +117,7 @@ export default {
apiGetLuck(this.query).then(res => { apiGetLuck(this.query).then(res => {
console.log(res) console.log(res)
if (res && res.code === 0) { if (res && res.code == 200) {
console.log('获取token') console.log('获取token')
if(res.luck.isFinish === 0){ if(res.luck.isFinish === 0){
this.requst = res.luck this.requst = res.luck

View File

@ -90,7 +90,7 @@
'password': this.dataForm.password, 'password': this.dataForm.password,
'newPassword': this.dataForm.newPassword 'newPassword': this.dataForm.newPassword
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -103,7 +103,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiLogout({}).then(res => { apiLogout({}).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
clearLoginInfo() clearLoginInfo()
this.$router.push({ name: 'login' }) this.$router.push({ name: 'login' })
} }

View File

@ -90,7 +90,7 @@ export default {
// //
handleGetUserInfo () { handleGetUserInfo () {
apiGetUserInfo({}, '').then(res => { apiGetUserInfo({}, '').then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.loading = false this.loading = false
this.userId = res.user && res.user.id this.userId = res.user && res.user.id
this.userName = res.user && res.user.userName this.userName = res.user && res.user.userName

View File

@ -124,7 +124,7 @@ export default {
if(this.isAdd){ if(this.isAdd){
apiAddDeviceBrands(this.specReq).then((data) => { apiAddDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('添加成功') this.$message('添加成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')
@ -135,7 +135,7 @@ export default {
} else { } else {
apiEditDeviceBrands(this.specReq).then((data) => { apiEditDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('更新成功') this.$message('更新成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')

View File

@ -165,7 +165,7 @@ export default {
rank: null, rank: null,
}).then((data) => { }).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message('删除成功') this.$message('删除成功')
this.getData() this.getData()
} else { } else {
@ -181,7 +181,7 @@ export default {
this.dataListLoading = true this.dataListLoading = true
apiGetDeviceBrandList(this.specReq).then((data) => { apiGetDeviceBrandList(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.rows; this.data = data.rows;
this.totalPage = data.total this.totalPage = data.total
this.types = data.types this.types = data.types

View File

@ -198,7 +198,7 @@ export default {
console.log("editSpecs"); console.log("editSpecs");
apiEditUseDevice(this.specReq).then((data) => { apiEditUseDevice(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false; this.visible = false;
this.$message("更新成功"); this.$message("更新成功");
this.$emit("refreshDataList"); this.$emit("refreshDataList");

View File

@ -318,7 +318,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
apiGetUseDeviceList(this.specReq).then((data) => { apiGetUseDeviceList(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.rows; this.data = data.rows;
this.totalPage = data.total; this.totalPage = data.total;
this.types = data.types; this.types = data.types;
@ -333,7 +333,7 @@ export default {
getBrands() { getBrands() {
apiGetDeviceBrands(this.specReq).then((data) => { apiGetDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.brands = data.brands; this.brands = data.brands;
this.btnSearch() this.btnSearch()
} else { } else {
@ -373,7 +373,7 @@ export default {
handlePrint(val) { handlePrint(val) {
apiGetRePrintCode({}, val.code).then((data) => { apiGetRePrintCode({}, val.code).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message("发送打印请求成功"); this.$message("发送打印请求成功");
} else { } else {
this.$message.error("发送打印请求失败!" + data.msg); this.$message.error("发送打印请求失败!" + data.msg);
@ -416,7 +416,7 @@ export default {
other: null other: null
}).then((data) => { }).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message("删除成功"); this.$message("删除成功");
this.getData(); this.getData();
} else { } else {

View File

@ -113,7 +113,7 @@ export default {
} }
apiGetNewPrintCodes({}, this.newCount).then((data) => { apiGetNewPrintCodes({}, this.newCount).then((data) => {
console.log(data) console.log(data)
if (data && data.code === 0) { if (data && data.code == 200) {
this.getData() this.getData()
this.$message('发送打印请求成功') this.$message('发送打印请求成功')
} else { } else {
@ -143,7 +143,7 @@ export default {
handlePrint (val) { handlePrint (val) {
apiGetRePrintCode({}, val.code).then((data) => { apiGetRePrintCode({}, val.code).then((data) => {
console.log(data) console.log(data)
if (data && data.code === 0) { if (data && data.code == 200) {
this.getData() this.getData()
this.$message('发送打印请求成功') this.$message('发送打印请求成功')
@ -160,7 +160,7 @@ export default {
this.dataListLoading = true this.dataListLoading = true
apiGetCodes(this.specReq).then((data) => { apiGetCodes(this.specReq).then((data) => {
console.log(data) console.log(data)
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.codes.list this.data = data.codes.list
this.totalPage = data.codes.totalCount this.totalPage = data.codes.totalCount
} else { } else {

View File

@ -141,7 +141,7 @@ export default {
getBrands(){ getBrands(){
apiGetDeviceBrands(this.specReq).then((data) => { apiGetDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.brands = data.brands this.brands = data.brands
this.brands.splice(0, 1); this.brands.splice(0, 1);
} else { } else {
@ -193,7 +193,7 @@ export default {
if(this.isAdd){ if(this.isAdd){
apiAddDeviceSpecs(this.specReq).then((data) => { apiAddDeviceSpecs(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('添加成功') this.$message('添加成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')
@ -204,7 +204,7 @@ export default {
} else { } else {
apiEditDeviceSpecs(this.specReq).then((data) => { apiEditDeviceSpecs(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('更新成功') this.$message('更新成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')

View File

@ -193,7 +193,7 @@ export default {
remark: null, remark: null,
used: 0}).then((data) => { used: 0}).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message('删除成功') this.$message('删除成功')
this.getData() this.getData()
} else { } else {
@ -209,7 +209,7 @@ export default {
this.dataListLoading = true this.dataListLoading = true
apiGetDeviceSpecs(this.specReq).then((data) => { apiGetDeviceSpecs(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.rows; this.data = data.rows;
this.totalPage = data.total this.totalPage = data.total
this.types = data.types this.types = data.types
@ -222,7 +222,7 @@ export default {
getBrands(){ getBrands(){
apiGetDeviceBrands(this.specReq).then((data) => { apiGetDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.brands = data.brands this.brands = data.brands
this.specReq.page = 1 this.specReq.page = 1
this.getData() this.getData()

View File

@ -79,7 +79,7 @@ export default {
addNewSpec(){ addNewSpec(){
apiAddTCounts().then((data) =>{ apiAddTCounts().then((data) =>{
if(data.code == 0){ if(data.code == 200){
this.$message(data.msg) this.$message(data.msg)
this.specReq.page = 1 this.specReq.page = 1
this.getData() this.getData()
@ -133,7 +133,7 @@ export default {
count:null count:null
}).then((data) => { }).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message('删除成功') this.$message('删除成功')
this.getData() this.getData()
} else { } else {
@ -149,7 +149,7 @@ export default {
this.dataListLoading = true this.dataListLoading = true
apiGetTCounts(this.specReq).then((data) => { apiGetTCounts(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.rows.list; this.data = data.rows.list;
this.totalPage = data.rows.totalCount this.totalPage = data.rows.totalCount
} else { } else {

View File

@ -97,7 +97,7 @@ export default {
if(this.isAdd){ if(this.isAdd){
apiAddDeviceTypes(this.specReq).then((data) => { apiAddDeviceTypes(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('添加成功') this.$message('添加成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')
@ -108,7 +108,7 @@ export default {
} else { } else {
apiEditDeviceTypes(this.specReq).then((data) => { apiEditDeviceTypes(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.visible = false this.visible = false
this.$message('更新成功') this.$message('更新成功')
this.$emit('refreshDataList') this.$emit('refreshDataList')

View File

@ -156,7 +156,7 @@ export default {
rank: null // rank: null //
}).then((data) => { }).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message('删除成功') this.$message('删除成功')
this.getData() this.getData()
} else { } else {
@ -172,7 +172,7 @@ export default {
this.dataListLoading = true this.dataListLoading = true
apiGetDeviceTypes(this.specReq).then((data) => { apiGetDeviceTypes(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.rows; this.data = data.rows;
this.totalPage = data.total this.totalPage = data.total
this.types = data.types this.types = data.types
@ -185,7 +185,7 @@ export default {
getBrands(){ getBrands(){
apiGetDeviceBrands(this.specReq).then((data) => { apiGetDeviceBrands(this.specReq).then((data) => {
console.log(data); console.log(data);
if (data && data.code === 0) { if (data && data.code == 200) {
this.brands = data.brands this.brands = data.brands
this.specReq.page = 1 this.specReq.page = 1
this.getData() this.getData()

View File

@ -56,7 +56,7 @@ export default {
setTimeout(() => { setTimeout(() => {
loading.close() loading.close()
}, 500) }, 500)
if (result.code === 0) { if (result.code == 200) {
this.dataInfo = result.data this.dataInfo = result.data
} else { } else {
this.$message.error(result.mgs) this.$message.error(result.mgs)

View File

@ -305,7 +305,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
apiChangeEquipment(this.deviceInfo).then((data) => { apiChangeEquipment(this.deviceInfo).then((data) => {
console.log(data.data); console.log(data.data);
if (data.code == 0) { if (data.code == 200) {
if(this.$route.query.type == 4){ if(this.$route.query.type == 4){
this.$message("回收成功"); this.$message("回收成功");
this.btnOpt = 0; this.btnOpt = 0;
@ -390,7 +390,7 @@ export default {
apiFindEquipmentByCode({}, this.deviceInfo.code).then((data) => { apiFindEquipmentByCode({}, this.deviceInfo.code).then((data) => {
console.log(data); console.log(data);
if (data.code == 0) { if (data.code == 200) {
if (typeof data.data == "undefined") { if (typeof data.data == "undefined") {
this.$message("未绑定设备"); this.$message("未绑定设备");
} else { } else {

View File

@ -101,7 +101,7 @@ export default {
this.dataListLoading = true; this.dataListLoading = true;
apiFindStaffDevice(this.findEqInfo).then((data) => { apiFindStaffDevice(this.findEqInfo).then((data) => {
console.log(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.list = [...this.findEqInfo.list, ...data.data.list]
this.findEqInfo.currPage = data.data.currPage this.findEqInfo.currPage = data.data.currPage
this.findEqInfo.totalPage = data.data.totalPage this.findEqInfo.totalPage = data.data.totalPage
@ -131,7 +131,7 @@ export default {
this.getData() this.getData()
/*apiFindStaffDevice(this.findEqInfo).then((data) => { /*apiFindStaffDevice(this.findEqInfo).then((data) => {
console.log(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.list = [...this.findEqInfo.list, ...data.data.list]
this.findEqInfo.currPage = data.data.currPage this.findEqInfo.currPage = data.data.currPage
this.findEqInfo.totalPage = data.data.totalPage this.findEqInfo.totalPage = data.data.totalPage

View File

@ -85,7 +85,7 @@ export default {
'categorys': this.categorys 'categorys': this.categorys
}).then(data => { }).then(data => {
console.log(data) console.log(data)
if (data && data.code === 0) { if (data && data.code == 200) {
this.data = data.data this.data = data.data
} else { } else {
this.data = [] this.data = []

View File

@ -60,7 +60,7 @@
// //
handleEdit () { handleEdit () {
apiSysScheduleInfo({}, `/${this.dataForm.id}`).then(res => { apiSysScheduleInfo({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataForm.beanName = res.schedule.beanName this.dataForm.beanName = res.schedule.beanName
this.dataForm.params = res.schedule.params this.dataForm.params = res.schedule.params
this.dataForm.cronExpression = res.schedule.cronExpression this.dataForm.cronExpression = res.schedule.cronExpression
@ -82,7 +82,7 @@
'status': !this.dataForm.id ? undefined : this.dataForm.status 'status': !this.dataForm.id ? undefined : this.dataForm.status
} }
apiSysScheduleConfirm(params, this.apiType).then(res => { apiSysScheduleConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -75,7 +75,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'jobId': this.dataForm.id 'jobId': this.dataForm.id
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -99,7 +99,7 @@ export default {
// //
handleShowErrorInfo (id) { handleShowErrorInfo (id) {
apiSysScheduleLogInfo({}, `/${id}`).then(res => { apiSysScheduleLogInfo({}, `/${id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$alert(res.log.error) this.$alert(res.log.error)
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

@ -144,7 +144,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'beanName': this.dataForm.beanName 'beanName': this.dataForm.beanName
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -187,7 +187,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysScheduleDelete(ids).then(res => { apiSysScheduleDelete(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -213,7 +213,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysSchedulePause(ids).then(res => { apiSysSchedulePause(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -239,7 +239,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysScheduleResume(ids).then(res => { apiSysScheduleResume(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -265,7 +265,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysScheduleRun(ids).then(res => { apiSysScheduleRun(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -97,7 +97,7 @@
init (id) { init (id) {
this.visible = true this.visible = true
apiSysOssConfig({}).then(res => { 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) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
apiSysOssSaveConfig(this.dataForm).then(res => { apiSysOssSaveConfig(this.dataForm).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -47,7 +47,7 @@
handleSuccess (response, file, fileList) { handleSuccess (response, file, fileList) {
this.fileList = fileList this.fileList = fileList
this.successNum++ this.successNum++
if (response && response.code === 0) { if (response && response.code == 200) {
if (this.num === this.successNum) { if (this.num === this.successNum) {
this.$confirm('操作成功, 是否继续操作?', '提示', { this.$confirm('操作成功, 是否继续操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

View File

@ -83,7 +83,7 @@ export default {
'page': this.pageIndex, 'page': this.pageIndex,
'limit': this.pageSize 'limit': this.pageSize
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -133,7 +133,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysOssDelete(ids).then(res => { apiSysOssDelete(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -54,7 +54,7 @@ export default {
setTimeout(() => { setTimeout(() => {
loading.close() loading.close()
}, 500) }, 500)
if (result && result.code === 0) { if (result && result.code == 200) {
this.dataInfo = result.data this.dataInfo = result.data
} else { } else {
this.$message.error(result.msg) this.$message.error(result.msg)

View File

@ -182,7 +182,7 @@
'departmentId': this.departmentId, 'departmentId': this.departmentId,
'selectMonthTime': this.selectMonthTime 'selectMonthTime': this.selectMonthTime
}).then(res => { }).then(res => {
if (res && res.code === 0 && res.page) { if (res && res.code == 200 && res.page) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {

View File

@ -65,7 +65,7 @@ export default {
} }
this.resultCommentEditor.txt.html('<p></p>') this.resultCommentEditor.txt.html('<p></p>')
const data = await getResultComment(this.recordResultId) const data = await getResultComment(this.recordResultId)
if (data && data.code === 0) { if (data && data.code == 200) {
this.resultCommitId = data.resultComment.id this.resultCommitId = data.resultComment.id
this.rollbackData = data.list this.rollbackData = data.list
if (this.keyResultEditor !== null) { if (this.keyResultEditor !== null) {
@ -90,7 +90,7 @@ export default {
'status': status, 'status': status,
'resultCommitId': this.resultCommitId 'resultCommitId': this.resultCommitId
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$emit('refreshDataList', this.recordResultId) this.$emit('refreshDataList', this.recordResultId)
this.alertInfo('更新成功') this.alertInfo('更新成功')
} else { } else {

View File

@ -51,7 +51,7 @@ export default {
getMyDate({ getMyDate({
'recordResultId': this.recordResultId 'recordResultId': this.recordResultId
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.list this.dataList = data.list
this.dataForm.monthTime = this.dataList[0].value this.dataForm.monthTime = this.dataList[0].value
} else { } else {
@ -74,7 +74,7 @@ export default {
'recordResultId': this.recordResultId, 'recordResultId': this.recordResultId,
'monthTime': this.dataForm.monthTime 'monthTime': this.dataForm.monthTime
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$emit('refreshDataList', this.recordResultId) this.$emit('refreshDataList', this.recordResultId)
this.visible = false this.visible = false
this.alertInfo('更新成功') this.alertInfo('更新成功')

View File

@ -92,7 +92,7 @@
method: 'get', method: 'get',
params: this.$http.adornParams() params: this.$http.adornParams()
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataForm.isDelete = data.lzresultrecord.isDelete this.dataForm.isDelete = data.lzresultrecord.isDelete
this.dataForm.gmtCreate = data.lzresultrecord.gmtCreate this.dataForm.gmtCreate = data.lzresultrecord.gmtCreate
this.dataForm.gmtModified = data.lzresultrecord.gmtModified this.dataForm.gmtModified = data.lzresultrecord.gmtModified
@ -125,7 +125,7 @@
'remark': this.dataForm.remark 'remark': this.dataForm.remark
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -230,7 +230,7 @@ export default {
departmentQuery({ departmentQuery({
'departmentId': departmentId 'departmentId': departmentId
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this['departmentList' + i] = data.departmentList this['departmentList' + i] = data.departmentList
if (i === '2') { if (i === '2') {
this.dataForm['department2'] = '' this.dataForm['department2'] = ''
@ -268,7 +268,7 @@ export default {
'remark': this.dataForm.remark, 'remark': this.dataForm.remark,
'isSelf': 1 'isSelf': 1
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.departmentList1 = data.departmentList1 this.departmentList1 = data.departmentList1
@ -307,7 +307,7 @@ export default {
await addRecordAjudex({ await addRecordAjudex({
'type': recordType 'type': recordType
}).then(data => { }).then(data => {
if (data && data.code !== 0) { if (data && data.code !== 200) {
flag = true flag = true
this.$message({ this.$message({
message: data.msg, message: data.msg,
@ -347,7 +347,7 @@ export default {
deleteRecord({ deleteRecord({
'ids': ids.join(',') 'ids': ids.join(',')
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.getDataList() this.getDataList()
this.$message({ this.$message({
message: data.msg, message: data.msg,

View File

@ -318,7 +318,7 @@ export default {
departmentQuery({ departmentQuery({
'departmentId': departmentId 'departmentId': departmentId
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this['departmentList' + i] = data.departmentList this['departmentList' + i] = data.departmentList
if (i === '2') { if (i === '2') {
this.dataForm['department2'] = '' this.dataForm['department2'] = ''
@ -355,7 +355,7 @@ export default {
'isSelf': 2, 'isSelf': 2,
'isChangeDepartmentrtment': this.isChangeDepartmentrtment 'isChangeDepartmentrtment': this.isChangeDepartmentrtment
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.departmentLevel = data.departmentLevel this.departmentLevel = data.departmentLevel
@ -440,7 +440,7 @@ export default {
method: 'post', method: 'post',
data: this.$http.adornData(ids, false) data: this.$http.adornData(ids, false)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -78,7 +78,7 @@ export default {
'type': this.type, 'type': this.type,
'id': this.dataForm.id 'id': this.dataForm.id
}) })
if (data && data.code !== 0) { if (data && data.code !== 200) {
callback(new Error(data.msg)) callback(new Error(data.msg))
} }
callback() callback()
@ -180,7 +180,7 @@ export default {
'type': this.type, 'type': this.type,
'id': this.dataForm.id 'id': this.dataForm.id
}) })
if (data && data.code !== 0) { if (data && data.code !== 200) {
this.$message({ this.$message({
message: data.msg, message: data.msg,
type: 'success', type: 'success',
@ -240,7 +240,7 @@ export default {
if (this.dataForm.id && this.dataForm.id > 0) { if (this.dataForm.id && this.dataForm.id > 0) {
const data = await apiDetailInfo(this.dataForm.id) const data = await apiDetailInfo(this.dataForm.id)
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataForm = data.detailInfo this.dataForm = data.detailInfo
if (this.keyResultEditor !== null) { if (this.keyResultEditor !== null) {
this.keyResultEditor.txt.html(this.dataForm.keyResult || '') this.keyResultEditor.txt.html(this.dataForm.keyResult || '')
@ -306,7 +306,7 @@ export default {
'type': this.type, 'type': this.type,
'id': this.dataForm.id 'id': this.dataForm.id
}) })
if (data && data.code !== 0) { if (data && data.code !== 200) {
this.alertInfo(data.msg) this.alertInfo(data.msg)
return return
} }
@ -360,7 +360,7 @@ export default {
'recordType': this.recordType, 'recordType': this.recordType,
'priority': priority1 'priority': priority1
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -387,7 +387,7 @@ export default {
return return
} }
const data = await recorddetailDelete(this.dataForm.id) const data = await recorddetailDelete(this.dataForm.id)
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '删除成功', message: '删除成功',
type: 'success', type: 'success',

View File

@ -221,7 +221,7 @@ export default {
'recordResultId': id, 'recordResultId': id,
'recordType': this.recordType 'recordType': this.recordType
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.clientHeight = window.innerHeight - 50 this.clientHeight = window.innerHeight - 50
this.tableData = data.list this.tableData = data.list
this.yeJiCheckNum = data.yeJiCheckNum this.yeJiCheckNum = data.yeJiCheckNum
@ -291,7 +291,7 @@ export default {
'status': status 'status': status
}).then(data => { }).then(data => {
if (data) { if (data) {
if (data.code === 0) { if (data.code == 200) {
this.getDataList() this.getDataList()
} }
this.$message({ this.$message({

View File

@ -118,7 +118,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'recordId': this.recordResultId 'recordId': this.recordResultId
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
} else { } else {
@ -153,7 +153,7 @@ export default {
deleteFile({ deleteFile({
'id': id 'id': id
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.getDataList() this.getDataList()
this.$message({ this.$message({
message: data.msg, message: data.msg,

View File

@ -143,7 +143,7 @@
'level': this.level, 'level': this.level,
'type': this.type 'type': this.type
}).then(res => { }).then(res => {
if (res && res.code === 0 && res.page) { if (res && res.code == 200 && res.page) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {

View File

@ -64,7 +64,7 @@
method: 'get', method: 'get',
params: this.$http.adornParams() params: this.$http.adornParams()
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataForm.isDelete = data.lzflowmanager.isDelete this.dataForm.isDelete = data.lzflowmanager.isDelete
this.dataForm.gmtCreate = data.lzflowmanager.gmtCreate this.dataForm.gmtCreate = data.lzflowmanager.gmtCreate
this.dataForm.gmtModified = data.lzflowmanager.gmtModified this.dataForm.gmtModified = data.lzflowmanager.gmtModified
@ -89,7 +89,7 @@
'name': this.dataForm.name 'name': this.dataForm.name
}) })
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -149,7 +149,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'name': this.dataForm.name 'name': this.dataForm.name
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
} else { } else {
@ -181,7 +181,7 @@ export default {
async handleGetTableList (id) { async handleGetTableList (id) {
this.loading = true this.loading = true
let result = await apiGetFlowInfo(this.query.staffId) let result = await apiGetFlowInfo(this.query.staffId)
if (result.code === 0) { if (result.code == 200) {
this.tableData = result.page.list this.tableData = result.page.list
this.query.pageTotal = result.page.totalCount this.query.pageTotal = result.page.totalCount
} else { } else {
@ -226,7 +226,7 @@ export default {
method: 'post', method: 'post',
data: this.$http.adornData(ids, false) data: this.$http.adornData(ids, false)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -104,7 +104,7 @@ export default {
// //
handleEdit () { handleEdit () {
apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => { apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataForm = Object.assign({}, this.dataForm, res.role) this.dataForm = Object.assign({}, this.dataForm, res.role)
var idx = res.role.menuIdList.indexOf(this.tempKey) var idx = res.role.menuIdList.indexOf(this.tempKey)
if (idx !== -1) { if (idx !== -1) {
@ -132,7 +132,7 @@ export default {
'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys()) 'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys())
} }
apiSysRoleConfirm(params, this.apiType).then(res => { apiSysRoleConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -107,7 +107,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'name': this.dataForm.name 'name': this.dataForm.name
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
} else { } else {
@ -154,7 +154,7 @@ export default {
method: 'post', method: 'post',
data: this.$http.adornData(ids, false) data: this.$http.adornData(ids, false)
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -144,7 +144,7 @@ export default {
// //
async getDataList () { async getDataList () {
const data = await apiSysRoleInfo(this.dataForm.id) const data = await apiSysRoleInfo(this.dataForm.id)
if (data && data.code === 0) { if (data && data.code == 200) {
this.staffs = data.staffs this.staffs = data.staffs
this.lzStaffRole = data.lzStaffRole this.lzStaffRole = data.lzStaffRole
this.dataForm.staffId = data.lzStaffRole.staffId this.dataForm.staffId = data.lzStaffRole.staffId
@ -173,7 +173,7 @@ export default {
// //
handleEdit () { handleEdit () {
apiSysRoleList({}, `/${this.dataForm.id}`).then(res => { apiSysRoleList({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataForm = Object.assign({}, this.dataForm, res.role) this.dataForm = Object.assign({}, this.dataForm, res.role)
var idx = res.role.menuIdList.indexOf(this.tempKey) var idx = res.role.menuIdList.indexOf(this.tempKey)
if (idx !== -1) { if (idx !== -1) {
@ -203,7 +203,7 @@ export default {
'resultRole': this.dataForm.resultRole 'resultRole': this.dataForm.resultRole
} }
apiSysRoleConfirm(params, this.apiType).then(res => { apiSysRoleConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -116,7 +116,7 @@
'limit': this.pageSize, 'limit': this.pageSize,
'name': this.dataForm.name 'name': this.dataForm.name
}).then(data => { }).then(data => {
if (data && data.code === 0) { if (data && data.code == 200) {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
} else { } else {
@ -159,7 +159,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const data = apiDelete(id) const data = apiDelete(id)
if (data && data.code === 0) { if (data && data.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -173,7 +173,7 @@ export default {
methods: { methods: {
async getEmployeesInfo (data) { async getEmployeesInfo (data) {
const result = await apiEmployeesInfo(data) const result = await apiEmployeesInfo(data)
if (result.code === 0) { if (result.code == 200) {
this.activeName = 'first' this.activeName = 'first'
this.dialogVisible = true this.dialogVisible = true
this.employeesInfo = result.data this.employeesInfo = result.data
@ -196,7 +196,7 @@ export default {
async handleGetTableList (id) { async handleGetTableList (id) {
let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.limit })) 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.tableData = result.page.list
this.query.pageTotal = result.page.totalCount this.query.pageTotal = result.page.totalCount
} else { } else {

View File

@ -215,7 +215,7 @@ export default {
this.isUploading = true this.isUploading = true
let result = await apiUploadFile(data) let result = await apiUploadFile(data)
this.isUploading = false this.isUploading = false
if (result.code === 0) { if (result.code == 200) {
this.$message.success('上传成功!') this.$message.success('上传成功!')
} else { } else {
this.$message.error(result.msg) this.$message.error(result.msg)
@ -254,7 +254,7 @@ export default {
this.dialogVisible = true this.dialogVisible = true
// const result = await apiEmployeesInfo(data) // const result = await apiEmployeesInfo(data)
// if (result.code === 0) { // if (result.code == 200) {
// this.dialogVisible = true // this.dialogVisible = true
// this.employeesInfo = result.data // this.employeesInfo = result.data
// } else { // } else {
@ -279,7 +279,7 @@ export default {
this.loading = true this.loading = true
let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.limit })) let result = await apiEmployeesList(Object.assign({}, this.query, { limit: this.query.limit }))
console.log('result: ', result) console.log('result: ', result)
if (result.code === 0) { if (result.code == 200) {
this.tableData = result.page.list this.tableData = result.page.list
this.query.pageTotal = result.page.totalCount this.query.pageTotal = result.page.totalCount
} else { } else {

View File

@ -61,7 +61,7 @@ export default {
setTimeout(() => { setTimeout(() => {
loading.close() loading.close()
}, 500) }, 500)
if (result.code === 0) { if (result.code == 200) {
this.dataInfo = result.data this.dataInfo = result.data
} else { } else {
this.$message.error(result.mgs) this.$message.error(result.mgs)

View File

@ -54,7 +54,7 @@
}, },
handleEdit () { handleEdit () {
apiSysConfigInfo({}, `/${this.dataForm.id}`).then(res => { apiSysConfigInfo({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataForm.paramKey = res.config.paramKey this.dataForm.paramKey = res.config.paramKey
this.dataForm.paramValue = res.config.paramValue this.dataForm.paramValue = res.config.paramValue
this.dataForm.remark = res.config.remark this.dataForm.remark = res.config.remark
@ -72,7 +72,7 @@
'remark': this.dataForm.remark 'remark': this.dataForm.remark
} }
apiSysConfigConfirm(params, this.apiType).then(res => { apiSysConfigConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -84,7 +84,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'paramKey': this.dataForm.paramKey 'paramKey': this.dataForm.paramKey
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -127,7 +127,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysConfigDelete(ids).then(res => { apiSysConfigDelete(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -78,7 +78,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'key': this.dataForm.key 'key': this.dataForm.key
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {

View File

@ -117,7 +117,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysMenuDelete('', `/${id}`).then(res => { apiSysMenuDelete('', `/${id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -223,7 +223,7 @@ export default {
'icon': this.dataForm.icon 'icon': this.dataForm.icon
} }
apiSysMenuConfirm(params, this.apiType).then(res => { apiSysMenuConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -111,7 +111,7 @@ export default {
'limit': this.pageSize, 'limit': this.pageSize,
'roleName': this.dataForm.roleName 'roleName': this.dataForm.roleName
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -154,7 +154,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysRoleDelete(ids).then(res => { apiSysRoleDelete(ids).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -118,7 +118,7 @@ export default {
// //
handleEdit () { handleEdit () {
apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => { apiSysRoleInfo({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataForm = Object.assign({}, this.dataForm, res.role) this.dataForm = Object.assign({}, this.dataForm, res.role)
var idx = res.role.menuIdList.indexOf(this.tempKey) var idx = res.role.menuIdList.indexOf(this.tempKey)
if (idx !== -1) { if (idx !== -1) {
@ -152,7 +152,7 @@ export default {
'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys()) 'menuIdList': [].concat(this.$refs.menuListTree.getCheckedKeys(), [this.tempKey], this.$refs.menuListTree.getHalfCheckedKeys())
} }
apiSysRoleConfirm(params, this.apiType).then(res => { apiSysRoleConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -122,7 +122,7 @@
'mobile': this.dataForm.mobile, 'mobile': this.dataForm.mobile,
'roleName': this.dataForm.roleName 'roleName': this.dataForm.roleName
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.dataList = res.page.list this.dataList = res.page.list
this.totalPage = res.page.totalCount this.totalPage = res.page.totalCount
} else { } else {
@ -165,7 +165,7 @@
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
apiSysUserDelete(userIds).then(res => { apiSysUserDelete(userIds).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',

View File

@ -182,7 +182,7 @@ export default {
// //
handleGetSysRoleSelect (id) { handleGetSysRoleSelect (id) {
apiSysRoleSelect({}).then(res => { apiSysRoleSelect({}).then(res => {
this.roleList = res && res.code === 0 ? res.list : [] this.roleList = res && res.code == 200 ? res.list : []
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -192,7 +192,7 @@ export default {
// //
handleEdit () { handleEdit () {
apiSysUserInfo({}, `/${this.dataForm.id}`).then(res => { apiSysUserInfo({}, `/${this.dataForm.id}`).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$nextTick(() => { this.$nextTick(() => {
this.dataForm.username = res.user.username this.dataForm.username = res.user.username
this.dataForm.realName = res.user.realName this.dataForm.realName = res.user.realName
@ -224,7 +224,7 @@ export default {
'roleIdList': this.dataForm.roleIdList 'roleIdList': this.dataForm.roleIdList
} }
apiSysUserConfirm(params, this.apiType).then(res => { apiSysUserConfirm(params, this.apiType).then(res => {
if (res && res.code === 0) { if (res && res.code == 200) {
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',