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 { 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 || '[]'))

View File

@ -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='登录成功,跳转中...'

View File

@ -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分员工新天地现场开奖'

View File

@ -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(() => {

View File

@ -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

View File

@ -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',

View File

@ -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' })
}

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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");

View File

@ -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 {

View File

@ -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 {

View File

@ -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')

View File

@ -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()

View File

@ -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 {

View File

@ -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')

View File

@ -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()

View File

@ -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)

View File

@ -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 {

View File

@ -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

View File

@ -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 = []

View File

@ -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',

View File

@ -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)

View File

@ -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',

View File

@ -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',

View File

@ -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: '确定',

View File

@ -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',

View File

@ -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)

View File

@ -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 {

View File

@ -65,7 +65,7 @@ export default {
}
this.resultCommentEditor.txt.html('<p></p>')
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 {

View File

@ -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('更新成功')

View File

@ -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',

View File

@ -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,

View File

@ -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',

View File

@ -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',

View File

@ -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({

View File

@ -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,

View File

@ -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 {

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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 {

View File

@ -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 {

View File

@ -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)

View File

@ -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',

View File

@ -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',

View File

@ -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 {

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',