Commit 3a1a644a by liimin

优化打包 lint

1 parent bba20059
......@@ -18,11 +18,11 @@ const request = (params = {}, method = RequestMethods.GET) => {
params.format = 'json'
// const url = process.env.NODE_ENV === 'production' ? 'router' : params.method
// return axios.post(url, { 'params': sign(params) })
const url =''// params.method
const url = ''// params.method
return axios({
url,
method,
params: sign(params),
params: sign(params)
})
}
export default request
......@@ -13,8 +13,8 @@ const user_path = 'fims.user.'
const role_path = 'fims.role.'
export const LOGIN_URL = `${user_path}login`
export const Reg_URL = `${user_path}register`
export const Role_LIST_URL = `${role_path}list`
export const Reg_URL = `${user_path}register`
export const Role_LIST_URL = `${role_path}list`
/**
* 用户登录
......
......@@ -8,7 +8,7 @@
import request from './request'
import RequestMethods from './request.methods'
export const BaseDataURL='fims.configuration.from.conftype'
export const BaseDataURL = 'fims.configuration.from.conftype'
// 基础数据
const path = 'fims.base.'
......
......@@ -5,8 +5,8 @@
* @Last Modified time: 2019-09-06 12:22:40
*/
import {LOGIN_URL,REG_URL,Role_LIST_URL} from '@/api/sys.account'
import {BaseDataURL} from '@/api/sys.base'
import { LOGIN_URL, REG_URL, Role_LIST_URL } from '@/api/sys.account'
import { BaseDataURL } from '@/api/sys.base'
export const TYPE_NAME = 'confType'
/**
......@@ -38,16 +38,16 @@ export const RegistType = {
* 前端免登录验证接口名
*/
export const LogExternals = [
LOGIN_URL, //登录
LOGIN_URL, // 登录
REG_URL, // 注册
BaseDataURL, //基础数据
Role_LIST_URL //角色列表
BaseDataURL, // 基础数据
Role_LIST_URL // 角色列表
]
/**
* 登录来源
*/
export const LOGIN_TYPE = 1 //1pc,2小程序
export const LOGIN_TYPE = 1 // 1pc,2小程序
/**
* 超级管理员类型
*/
export const SUPPER_ADMIN = 1 //
\ No newline at end of file
export const SUPPER_ADMIN = 1 //
/*
* @Author: limin
* @Date: 2019-09-06 10:12:23
* @Author: limin
* @Date: 2019-09-06 10:12:23
* @Last Modified by: limin
* @Last Modified time: 2019-09-06 13:23:25
*/
......
/*
* @Author: limin
* @Date: 2019-09-06 10:11:24
* @Author: limin
* @Date: 2019-09-06 10:11:24
* @Last Modified by: limin
* @Last Modified time: 2019-09-06 13:30:14
*/
const dateFormat = (dateStr,time)=>{
//得到特定的时间
var date = new Date(dateStr);
var year = date.getFullYear();
//ES6语法填充:var month = (date.getMonth()+1).toString().padStart(2, '0');
var month = date.getMonth()+1<10 ? '0'+ (date.getMonth()+1) : date.getMonth()+1;
var day = date.getDate()<10 ? '0' + date.getDate() : date.getDate();
var hh = date.getHours()<10 ? '0' + date.getHours() : date.getHours();
var mm = date.getMinutes()<10 ? '0' + date.getMinutes() : date.getMinutes();
var ss = date.getSeconds()<10 ? '0' + date.getSeconds() : date.getSeconds();
//return `${year}-${month}-${day}`;
if(time&&time.toLowerCase() === 'yyyy-mm-dd'){
return `${year}-${month}-${day}`;
}else if(time&&time.toLowerCase() === 'hh:mm:ss'){
return `${hh}:${mm}:${ss}`;
}else{
console.log(1);
return `${year}-${month}-${day} ${hh}:${mm}:${ss}`;
const dateFormat = (dateStr, time) => {
// 得到特定的时间
var date = new Date(dateStr)
var year = date.getFullYear()
// ES6语法填充:var month = (date.getMonth()+1).toString().padStart(2, '0');
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var hh = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var mm = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
// return `${year}-${month}-${day}`;
if (time && time.toLowerCase() === 'yyyy-mm-dd') {
return `${year}-${month}-${day}`
} else if (time && time.toLowerCase() === 'hh:mm:ss') {
return `${hh}:${mm}:${ss}`
} else {
console.log(1)
return `${year}-${month}-${day} ${hh}:${mm}:${ss}`
}
}
export { dateFormat }
......@@ -8,7 +8,7 @@
></el-avatar>
</div>
<div class="name-role">
<span class="sender">{{ user.userName }} - {{ user.roleType||'' }}</span>
<span class="sender">{{ user.userName }} - {{ ['超级管理员','管理员'][user.roleType] }}</span>
</div>
<div class="registe-info">
<span class="registe-info">
......@@ -37,8 +37,7 @@
</div>
</div>
<div class="personal-footer" @click="logOut">
<i class="fa fa-sign-out"></i>
注销
<el-button type="text"><i class="fa fa-sign-out"></i>注销</el-button>
</div>
<!--备份还原界面-->
<!-- <backup ref="backupDialog" @afterRestore="afterRestore"></backup> -->
......@@ -78,9 +77,9 @@ export default {
})
.catch(() => {
this.$store.commit('d2admin/gray/set', false)
Message({
message: '取消注销操作'
})
// Message({
// message: '取消注销操作'
// })
})
},
clear () {
......@@ -96,9 +95,9 @@ export default {
})
.catch(() => {
this.$store.commit('d2admin/gray/set', false)
Message({
message: '取消清除缓存操作'
})
// Message({
// message: '取消清除缓存操作'
// })
})
},
comfirm (text, title, cancleText) {
......@@ -129,10 +128,10 @@ export default {
}
</script>
<style scoped>
<style lang="scss" scoped>
.personal-panel {
font-size: 14px;
width: 220px;
width: 248px;
text-align: center;
border-color: rgba(180, 190, 190, 0.2);
border-width: 1px;
......@@ -173,30 +172,31 @@ export default {
}
.main-operation {
padding: 8px;
margin-right: 1px;
/* background: rgba(175, 182, 179, 0.3); */
border-color: rgba(201, 206, 206, 0.2);
border-top-width: 1px;
border-top-style: solid;
display: flex;
justify-content: space-between;
}
.main-operation-item {
margin: 4px;
}
.other-operation {
padding: 10px;
padding: 0;
margin-right: 1px;
text-align: left;
border-color: rgba(180, 190, 190, 0.2);
border-top-width: 1px;
border-top-style: solid;
}
.other-operation-item {
padding: 4px 8px;
}
.other-operation-item:hover {
cursor: pointer;
background: #9e94941e;
color: rgb(19, 138, 156);
&-item {
padding: 12px 16px;
}
&:hover{
cursor: pointer;
color: rgb(19, 138, 156);
background: #b1a6a61e;
}
}
.personal-footer {
margin-right: 1px;
......@@ -207,10 +207,10 @@ export default {
border-color: rgba(180, 190, 190, 0.2);
border-top-width: 1px;
border-top-style: solid;
}
.personal-footer:hover {
cursor: pointer;
color: rgb(19, 138, 156);
background: #b1a6a61e;
&:hover{
cursor: pointer;
color: rgb(19, 138, 156);
background: #b1a6a61e;
}
}
</style>
......@@ -107,7 +107,7 @@ permision.packMenusBtns = function (resources) {
__aParent.push(__oMenu)
// __aAll.push(__oMenu)
// if (__oMenu.auth) {
// __aAll = [...__aAll, ...__oMenu.auth]
// __aAll = [...__aAll, ...__oMenu.auth]
// }
} else { // 取出子菜单
__aSub.push(__oMenu)
......@@ -120,7 +120,7 @@ permision.packMenusBtns = function (resources) {
__aSub.forEach(obj => {
// __aAll.push(obj)
// if (obj.auth) {
// __aAll = [...__aAll, ...obj.auth]
// __aAll = [...__aAll, ...obj.auth]
// }
__parent = __aParent.find(menu => menu.authId === obj.parentId)
if (__parent.children) {
......@@ -165,13 +165,13 @@ permision.format2ResourceMenu = function (oMenu) {
/**
* 扁平化 routes (@/router/routes)
*/
permision.flatten=function(arr) {
return arr.reduce((result, item)=> {
item.authId= item.authId || item.meta.authId
item.parentId= item.parentId || item.meta.parentId
const cloneItem= cloneDeep(item)
delete cloneItem.auth
return result.concat(item.auth ? permision.flatten([...item.auth,cloneItem]) : item);
}, []);
permision.flatten = function (arr) {
return arr.reduce((result, item) => {
item.authId = item.authId || item.meta.authId
item.parentId = item.parentId || item.meta.parentId
const cloneItem = cloneDeep(item)
delete cloneItem.auth
return result.concat(item.auth ? permision.flatten([...item.auth, cloneItem]) : item)
}, [])
}
export default permision
......@@ -8,18 +8,18 @@ import router from '@/router'
import {
LogExternals
} from '@/common/constants'
axios.defaults.withCredentials = true
import qs from 'qs'
axios.defaults.withCredentials = true
const expiresMinute = 10
// 创建一个错误
function errorCreate(msg) {
function errorCreate (msg) {
const error = new Error(msg)
errorLog(error)
throw error
}
// 记录和显示错误
function errorLog(error) {
function errorLog (error) {
// 添加到日志
store.dispatch('d2admin/log/push', {
message: '数据请求异常',
......@@ -44,7 +44,7 @@ function errorLog(error) {
// VUE_APP_API=http://192.168.3.191:8944/router
// 创建一个 axios 实例
const service = axios.create({
baseURL: 'http://192.168.3.191:8944/router',//process.env.VUE_APP_API,
baseURL: 'http://192.168.3.191:8944/router', // process.env.VUE_APP_API,
timeout: 5000 // 请求超时时间
})
......@@ -66,7 +66,7 @@ service.interceptors.request.use(
router.replace('/login')
}
}
const inExpiresMinutes = new Date(new Date().getTime() + expiresMinute * 60 * 1000);
const inExpiresMinutes = new Date(new Date().getTime() + expiresMinute * 60 * 1000)
util.cookies.set('token', 'token', {
expires: inExpiresMinutes
})
......@@ -87,7 +87,7 @@ service.interceptors.response.use(
const dataAxios = response.data
// 这个状态码是和后端约定的
const {
code,data
code, data
} = dataAxios
// 有 code 代表这是一个后端接口 可以进行进一步的判断
switch (+code) {
......@@ -104,37 +104,37 @@ service.interceptors.response.use(
if (error && error.response) {
switch (error.response.status) {
case 400:
error.message = '请求错误';
error.message = '请求错误'
break
case 401:
error.message = '未授权,请登录';
error.message = '未授权,请登录'
break
case 403:
error.message = '拒绝访问';
error.message = '拒绝访问'
break
case 404:
error.message = `请求地址出错: ${error.response.config.url}`;
error.message = `请求地址出错: ${error.response.config.url}`
break
case 408:
error.message = '请求超时';
error.message = '请求超时'
break
case 500:
error.message = '服务器内部错误';
error.message = '服务器内部错误'
break
case 501:
error.message = '服务未实现';
error.message = '服务未实现'
break
case 502:
error.message = '网关错误';
error.message = '网关错误'
break
case 503:
error.message = '服务不可用';
error.message = '服务不可用'
break
case 504:
error.message = '网关超时';
error.message = '网关超时'
break
case 505:
error.message = 'HTTP版本不受支持';
error.message = 'HTTP版本不受支持'
break
default:
break
......@@ -145,4 +145,4 @@ service.interceptors.response.use(
}
)
export default service
\ No newline at end of file
export default service
......@@ -380,7 +380,7 @@ export const errorPage = {
// 导出需要显示菜单的
export const frameInRoutes = frameIn
export const localRoutes ={
export const localRoutes = {
...resources, [home.meta.authId]: home
}
......
......@@ -17,27 +17,27 @@ export default {
// console.log(router.addRoutes);
return new Promise((resolve, reject) => {
// 开始请求登录接口
AccountLogin(p).then(async (data={}) => {
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 整个系统依赖这两个数据进行校验和存储
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
// token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天
util.cookies.set('uuid', data.loginName)
const authes = data.roleType === SUPPER_ADMIN ?
util.permision.flatten(Object.values({...sources, [home.meta.authId]: home }))
.map(obj=>({authId:obj.authId,parentId:obj.parentId}))
:cloneDeep(data.authes) && delete data.authes
await dispatch('d2admin/auth/set', authes, { root: true })
// 设置 vuex 用户信息
await dispatch('d2admin/user/set', data, { root: true })
// 强制初始化基础数据
dispatch('d2admin/base/init', null, { root: true })
// 用户登录后从持久化数据加载一系列的设置
await dispatch('load')
// 结束
resolve()
})
AccountLogin(p).then(async (data = {}) => {
// 设置 cookie 一定要存 uuid 和 token 两个 cookie
// 整个系统依赖这两个数据进行校验和存储
// uuid 是用户身份唯一标识 用户注册的时候确定 并且不可改变 不可重复
// token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天
util.cookies.set('uuid', data.loginName)
const authes = data.roleType === SUPPER_ADMIN
? util.permision.flatten(Object.values({ ...sources, [home.meta.authId]: home }))
.map(obj => ({ authId: obj.authId, parentId: obj.parentId }))
: cloneDeep(data.authes) && delete data.authes
await dispatch('d2admin/auth/set', authes, { root: true })
// 设置 vuex 用户信息
await dispatch('d2admin/user/set', data, { root: true })
// 强制初始化基础数据
dispatch('d2admin/base/init', null, { root: true })
// 用户登录后从持久化数据加载一系列的设置
await dispatch('load')
// 结束
resolve()
})
.catch(err => {
console.log('err: ', err)
reject(err)
......
......@@ -34,7 +34,7 @@
<el-col :span="12" style="position: relative; display: flex; justify-content: flex-end; ">
<span style="margin-right: 10px;">
<auth-button
category="Button"
category="Button"
label="导出"
></auth-button>
</span>
......
......@@ -248,13 +248,13 @@ export default {
},
methods: {
...mapActions('d2admin/base', ["load"]),
...mapActions('d2admin/base', ['load']),
async loadBaseData () {
const modelToOptions = { 'stationName': 'station', 'subsystemTypeCode': 'subsys' }
const data = await this.load()
if(data) {
for(var item in modelToOptions) {
if (data) {
for (var item in modelToOptions) {
let pos = this.searchFormArr.findIndex(arrItem => arrItem.model == item)
this.searchFormArr[pos].options = data[modelToOptions[item]]
}
......
......@@ -27,8 +27,8 @@ export default {
isVisible: {
type: Boolean,
default: false
},
// title:
}
// title:
},
mounted () {},
......
......@@ -190,9 +190,9 @@ export default {
methods: {
async loadBaseData() {
async loadBaseData () {
this.baseData.subsys = await this.$store.dispatch('d2admin/base/get', BaseData.SUBSYS.KEY)
},
},
loadingGetList () {
this.tableLoading = true
......
......@@ -166,7 +166,7 @@ export default {
// 所属站点
stations: [],
// 职务
posts: [],
posts: []
}
}
},
......@@ -182,11 +182,11 @@ export default {
if (vaild) {
var __p = this.regForm
Reg(__p).then(res => {
const {operateStatus} = res
if(operateStatus){
const { operateStatus } = res
if (operateStatus) {
notice.okTips('注册信息已提交,请等待管理员审核')
this.handleClose()
}else {
this.handleClose()
} else {
notice.errorTips(`注册失败!`)
}
})
......
......@@ -95,11 +95,11 @@
<script>
import dayjs from 'dayjs'
import { mapActions,mapState } from 'vuex'
import { mapActions, mapState } from 'vuex'
import { LOGIN_TYPE } from '@/common/constants'
export default {
components: {
'DialogReg': () => import('./dialogReg'),
'DialogReg': () => import('./dialogReg')
},
data () {
return {
......@@ -150,10 +150,10 @@ export default {
// console.log(navigator.userAgent.toLocaleLowerCase())
this.$refs.loginForm.validate((valid) => {
if (valid) {
const { browser , os } = this.$store.state.d2admin.ua.data
console.log(this.formLogin);
const _p = {...this.formLogin,deviceCode:`${os.name}${os.version}-${browser.name}${browser.version}`}
console.log(_p);
const { browser, os } = this.$store.state.d2admin.ua.data
console.log(this.formLogin)
const _p = { ...this.formLogin, deviceCode: `${os.name}${os.version}-${browser.name}${browser.version}` }
console.log(_p)
// 登录
// 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码
......
......@@ -121,10 +121,10 @@ import { getListApi, reportApi, exportApi } from '@api/systemMonitor'
import notice from '@/common/notice'
import { mapActions } from 'vuex'
// import { BaseData } from '@/common/constants'
require('echarts/lib/chart/pie')
require('echarts/lib/component/tooltip')
// require('echarts/lib/chart/pie')
// require('echarts/lib/component/tooltip')
let echarts = require('echarts/lib/echarts')
// let echarts = require('echarts/lib/echarts')
export default {
name: 'systemMonitor',
......@@ -260,15 +260,15 @@ export default {
},
methods: {
...mapActions("d2admin/base", ["load"]),
...mapActions('d2admin/base', ['load']),
async loadBaseData() {
async loadBaseData () {
// this.baseData.station = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY)
const { station, subsys } = await this.load()
this.baseData.station = station
this.baseData.subsys = subsys
// console.log(this.baseData)
},
},
loadingGetList () {
this.tableLoading = true
......
......@@ -185,10 +185,10 @@ export default {
methods: {
async loadBaseData() {
async loadBaseData () {
this.baseData.station = await this.$store.dispatch('d2admin/base/get', BaseData.STATION.KEY)
},
loadingGetList () {
this.tableLoading = true
this.getList()
......
......@@ -60,8 +60,8 @@ export default {
},
watch: {
editData: {
handler: function (value) {
this.title = value && value.roleId ? '编辑角色':'创建角色'
handler: function (value) {
this.title = value && value.roleId ? '编辑角色' : '创建角色'
Object.assign(this.roleForm, value)
this.authIds = this.roleForm.authes || []
delete this.roleForm.authes
......@@ -78,15 +78,15 @@ export default {
},
resources () {
const clone = util.deepClone(Object.values(localRoutes))
const { menus }= util.permision.packMenusBtns(clone)
const { menus } = util.permision.packMenusBtns(clone)
const all = util.permision.flatten(clone)
return { menus,all }
return { menus, all }
}
},
data () {
return {
authIds: [],
title:'',
title: '',
roleForm: {
roleName: '',
description: ''
......@@ -94,7 +94,7 @@ export default {
rules: Object.freeze({
roleName: [
{ required: true, message: '角色名不能为空', trigger: ['blur'] }
],
],
authIds: [
{ required: true, message: '请分配权限', trigger: ['blur'] }
]
......@@ -108,14 +108,14 @@ export default {
submit () {
this.$refs.roleForm.validate(vaild => {
if (vaild) {
var __p = {...this.roleForm,authIds:this.authIds}
var __p = { ...this.roleForm, authIds: this.authIds }
RoleReg(__p).then(res => {
const {operateStatus} = res
if(operateStatus){
const { operateStatus } = res
if (operateStatus) {
notice.okTips(`${this.title}成功!`)
this.$refs.regForm.resetFields()
this.$event.$emit('e-role-dialog', false)
}else {
} else {
notice.errorTips(`${this.title}失败!`)
}
})
......
......@@ -41,7 +41,7 @@
</template>
<script>
import { RoleList,RoleDetail } from '@/api/sys.account'
import { RoleList, RoleDetail } from '@/api/sys.account'
import notice from '@/common/notice'
import util from '@/libs/util'
export default {
......@@ -69,7 +69,7 @@ export default {
label: '创建时间',
prop: 'createTime'
}
]),
])
// page: {
// // 页码
// pageCount: 1, // 每页条数
......@@ -92,7 +92,7 @@ export default {
RoleList()
.then(res => {
this.tableData = res
const { pagination,roles } = res
const { pagination, roles } = res
this.tableData = roles
// this.page = pagination
this.tableLoading = false
......@@ -114,8 +114,8 @@ export default {
// 调接口
this.loadRoleList()
},
async handleEdit (row ) {
this.editData = row && await RoleDetail({roleId:row.roleId})
async handleEdit (row) {
this.editData = row && await RoleDetail({ roleId: row.roleId })
this.editVisible = true
}
}
......
......@@ -75,8 +75,8 @@ export default {
this.setCheckedNodes()
},
btnChange (node, data, sta) {
let checked = sta //|| this.checked.some(child => child.parentId === node.key && child.authId !== data.authId);
checked && this.$refs.tree.setChecked(node.key, checked, true);
let checked = sta // || this.checked.some(child => child.parentId === node.key && child.authId !== data.authId);
checked && this.$refs.tree.setChecked(node.key, checked, true)
this.setCheckedNodes()
},
setCheckedNodes () {
......
......@@ -108,7 +108,7 @@ export default {
watch: {
editData: {
handler: function (value) {
this.title = value && value.id ? '编辑用户信息':'创建用户'
this.title = value && value.id ? '编辑用户信息' : '创建用户'
Object.assign(this.regForm, value)
},
immediate: true
......@@ -135,7 +135,7 @@ export default {
stationCode: '',
roleId: ''
},
title:'',
title: '',
rules: Object.freeze({
loginName: [
{ required: true, message: '用户名不能为空', trigger: ['blur'] }
......@@ -183,12 +183,12 @@ export default {
var __p = this.regForm
__p.createType = RegistType.BY_ADMIN
Reg(__p).then(res => {
const {operateStatus} = res
if(operateStatus){
const { operateStatus } = res
if (operateStatus) {
notice.okTips(`${this.title}成功!`)
this.$refs.regForm.resetFields()
this.$event.$emit('e-reg-dialog', false)
}else {
} else {
notice.errorTips(`${this.title}失败!`)
}
})
......
......@@ -69,17 +69,17 @@
<el-table-column label="用户名" prop="loginName" width="200" align="center" ></el-table-column>
<el-table-column label="角色" prop="roleName" width="140" align="center" ></el-table-column>
<el-table-column label="注册时间" prop="registerTime" width="200" align="center" ></el-table-column>
<el-table-column label="有效期" prop="validTime" width="200" align="center" ></el-table-column>
<el-table-column label="有效期" prop="validTime" width="200" align="center" ></el-table-column>
<el-table-column label="状态" prop="status" width="100" align="center">
<template slot-scope="scope">
<el-tag :effect="tag.effect" style="width:70px" :type="tag.type[scope.row.status]">{{tag.label[scope.row.status]}}</el-tag>
</template>
</el-table-column>
<el-table-column label="姓名" prop="userName" width="120" align="center" ></el-table-column>
<el-table-column label="姓名" prop="userName" width="120" align="center" ></el-table-column>
<el-table-column label="联系电话" prop="mobile" width="200" align="center" ></el-table-column>
<el-table-column label="所属公司" prop="companyName" width="200" align="center" ></el-table-column>
<el-table-column label="所属公司" prop="companyName" width="200" align="center" ></el-table-column>
<el-table-column label="部门" prop="departName" width="200" align="center" ></el-table-column>
<el-table-column label="职务" prop="postName" width="200" align="center" ></el-table-column>
<el-table-column label="职务" prop="postName" width="200" align="center" ></el-table-column>
<el-table-column label="所属站点" prop="stationName" width="200" align="center" ></el-table-column>
<el-table-column align="center" fixed="right" width="200" label="操作">
<template slot-scope="scope">
......@@ -121,10 +121,10 @@ export default {
},
data () {
return {
tag:Object.freeze({
effect:'dark',
type:['', 'success', 'info','danger','warning'],
label:['未知', '正常', '已过期','禁用','待审核']
tag: Object.freeze({
effect: 'dark',
type: ['', 'success', 'info', 'danger', 'warning'],
label: ['未知', '正常', '已过期', '禁用', '待审核']
}),
mapping: Object.freeze({
field: 'status',
......@@ -153,7 +153,7 @@ export default {
stationCode: '',
postCode: ''
},
searchTimes:[],
searchTimes: [],
// 表格
tableLoading: false,
tableData: [],
......@@ -161,7 +161,7 @@ export default {
// 页码
pageCount: 1,
pageSize: 10,
totalCount: 0 //总条数
totalCount: 0 // 总条数
},
/* -----------------------基础数据---------------------- */
baseData: {
......@@ -213,7 +213,7 @@ export default {
const params = this.getParams()
UserList(params)
.then(res => {
const { pagination,userList } = res
const { pagination, userList } = res
this.tableData = userList
this.page = pagination
this.tableLoading = false
......@@ -223,9 +223,9 @@ export default {
this.tableLoading = false
})
},
filterTag(value, row) {
return row.status === value;
},
filterTag (value, row) {
return row.status === value
},
handleRegister () {
this.registerDialogVisible = true
},
......
......@@ -24,7 +24,8 @@ const cdn = {
`${CDN_DOMAIN}/vuex/3.1.1/vuex.min.js`,
`${CDN_DOMAIN}/axios/0.19.0/axios.min.js`,
`${CDN_DOMAIN}/js-cookie/2.2.0/js.cookie.min.js`,
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.js`
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.js`,
`${CDN_DOMAIN}/echarts/4.3.0-rc.1/echarts.min.js`,
// `${CDN_DOMAIN}/lodash.js/4.17.15/lodash.min.js`
]
}
......@@ -50,7 +51,8 @@ module.exports = {
'vuex': 'Vuex',
'axios': 'axios',
'js-cookie': 'Cookies',
'nprogress': 'NProgress'
'nprogress': 'NProgress',
'echarts':'echarts'
// 'lodash':'lodash'
}
// 非开发环境
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!