Commit c2e97b11 by liimin

1.完善注册 2.增加 基础数据vuex 管理

1 parent d5893268
import request from './request'
const path = 'fims.device.'
function getListApi(data) {
function getListApi (data) {
data.method = `${path}list`
return request(data)
}
......@@ -32,4 +32,4 @@ export {
removeApi,
importApi,
exportApi
}
\ No newline at end of file
}
......@@ -3,8 +3,8 @@ import request from './request'
const path = 'fims.maintain.'
function getListApi (data) {
data.method = `${path}search`
return request(data)
data.method = `${path}search`
return request(data)
}
function removeApi (data) {
......@@ -13,12 +13,12 @@ function removeApi (data) {
}
function exportApi (data) {
data.method = `${path}export`
return request(data)
data.method = `${path}export`
return request(data)
}
export {
getListApi,
removeApi,
exportApi
}
\ No newline at end of file
}
......@@ -2,29 +2,29 @@ import request from './request'
const path = 'fims.order.'
function getListApi(data) {
data.method = `${path}search`
return request(data)
}
function detailApi (data) {
data.method = `${path}detail`
return request(data)
}
function removeApi (data) {
data.method = `${path}delete`
return request(data)
}
function getListApi (data) {
data.method = `${path}search`
return request(data)
}
function downloadApi (data) {
data.method = `${path}download`
return request(data)
}
export {
getListApi,
detailApi,
removeApi,
downloadApi
}
\ No newline at end of file
function detailApi (data) {
data.method = `${path}detail`
return request(data)
}
function removeApi (data) {
data.method = `${path}delete`
return request(data)
}
function downloadApi (data) {
data.method = `${path}download`
return request(data)
}
export {
getListApi,
detailApi,
removeApi,
downloadApi
}
......@@ -3,10 +3,10 @@ import request from './request'
const path = 'fims.material.'
function getListApi (data) {
data.method = `${path}list`
return request(data)
data.method = `${path}list`
return request(data)
}
export {
getListApi
}
\ No newline at end of file
getListApi
}
......@@ -2,12 +2,15 @@
* @Author: limin
* @Date: 2019-08-26 18:02:41
* @Last Modified by: limin
* @Last Modified time: 2019-08-29 03:55:24
* @Last Modified time: 2019-09-01 15:33:02
*/
import axios from '@/plugin/axios'
import sign from './sign'
const request = (params, method) => {
import RequestMethods from './request.methods'
// import util from '@/libs/util'
const request = (params = {}, method = RequestMethods.GET) => {
// params = util.deepClone(params)
params.source = ''
params.app_key = '48e5e13229b82c1b4e6e8c96151f0637'
params.timestamp = new Date().getTime()
......@@ -18,7 +21,7 @@ const request = (params, method) => {
const url = params.method
return axios({
url,
method: method || 'get',
method,
data: sign(params)
})
}
......
/*
* @Author: limin
* @Date: 2019-08-26 18:02:55
* @Last Modified by: limin
* @Last Modified time: 2019-09-01 17:18:41
*/
import request from './request'
import RequestMethods from './request.methods'
// 用户相关
const user_path = 'fims.user.'
/**
* 用户登录
* @param {*} data 参数
*/
export function AccountLogin (data) {
data.method = `${user_path}login`
return request(data, RequestMethods.POST)
}
/**
* 注册
* @param {*} data 参数
*/
export function Reg (data = {}) {
data.method = `${user_path}register`
return request(data, RequestMethods.GET)
}
/*
* @Author: limin
* @Date: 2019-08-26 18:02:55
* @Last Modified by: limin
* @Last Modified time: 2019-09-01 17:19:07
*/
import request from './request'
import RequestMethods from './request.methods'
// 基础数据
const path = 'fims.base.'
/**
* 获取站点列表
* @param {*} data 参数
*/
export function StationList (data = {}) {
data.method = `${path}station`
return request(data, RequestMethods.GET)
}
/**
* 获取公司列表
* @param {*} data 参数
*/
export function CompanyList (data = {}) {
data.method = `${path}company`
return request(data, RequestMethods.GET)
}
/**
* 获取部门列表
* @param {*} data 参数
*/
export function DepartList (data = {}) {
data.method = `${path}depart`
return request(data, RequestMethods.GET)
}
/**
* 获取角色列表
* @param {*} data 参数
*/
export function FetchRoleList (data = {}) {
data.method = `fims.role.list`
return request(data, RequestMethods.GET)
}
/*
* @Author: limin
* @Date: 2019-09-01 19:06:01
* @Last Modified by: limin
* @Last Modified time: 2019-09-01 19:06:01
*/
export const BaseData = {
ROLE: 'role',
COMPANY: 'company',
DEPART: 'depart',
STATION: 'station'
}
/*
* @Author: limin
* @Date: 2019-08-31 12:44:16
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:16
* @Author: limin
* @Date: 2019-08-31 12:44:16
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:16
*/
import Vue from 'vue'
import focus from './src/focus'
import focus from './src/focus'
Vue.directive(focus.name,focus)
\ No newline at end of file
Vue.directive(focus.name, focus)
/*
* @Author: limin
* @Date: 2019-08-31 12:44:08
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:08
* @Author: limin
* @Date: 2019-08-31 12:44:08
* @Last Modified by: limin
* @Last Modified time: 2019-08-31 12:44:08
*/
export default {
name:'focus',
inserted: function (el) {
el.querySelector('input').focus();
}
}
\ No newline at end of file
name: 'focus',
inserted: function (el) {
el.querySelector('input').focus()
}
}
......@@ -15,14 +15,14 @@ export default {
data () {
return {
predefine: [
'#FF0000','#008000','#0000FF'
'#FF0000', '#008000', '#0000FF'
]
}
},
computed: {
...mapState('d2admin', {
value:state=>state.color.value,
listTheme:state=>state.theme.list
value: state => state.color.value,
listTheme: state => state.theme.list
})
},
watch: {
......@@ -31,7 +31,7 @@ export default {
}
},
mounted () {
this.predefine= [...this.predefine,...this.listTheme.map(theme=>theme.color)]
this.predefine = [...this.predefine, ...this.listTheme.map(theme => theme.color)]
},
methods: {
...mapActions('d2admin/color', [
......
......@@ -46,100 +46,95 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import { Message, MessageBox } from "element-ui";
import { mapState, mapActions } from 'vuex'
import { Message, MessageBox } from 'element-ui'
export default {
name: "PersonalPanel",
name: 'PersonalPanel',
props: {
user: {
type: Object,
default: {
name: "admin",
avatar: "@/assets/user.png",
role: "超级管理员",
registeInfo: "注册时间:2018-12-25 "
name: 'admin',
avatar: '@/assets/user.png',
role: '超级管理员',
registeInfo: '注册时间:2018-12-25 '
}
}
},
computed: {
...mapState("d2admin/user", ["info"])
...mapState('d2admin/user', ['info'])
},
data() {
return {};
data () {
return {}
},
methods: {
...mapActions("d2admin/account", ["logout"]),
...mapActions('d2admin/account', ['logout']),
/**
* @description 登出
*/
logOut() {
this.$store.commit("d2admin/gray/set", true);
MessageBox.confirm("确定要注销当前用户吗", "注销用户", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
logOut () {
this.$store.commit('d2admin/gray/set', true)
MessageBox.confirm('确定要注销当前用户吗', '注销用户', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
// await this.$store.dispatch('d2admin/user/set', {})
await this.logout();
this.$router.push('/login')
})
await this.$store.commit('d2admin/gray/set', false)
// await this.$store.dispatch('d2admin/user/set', {})
await this.logout()
this.$router.push('/login')
})
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
this.$store.commit('d2admin/gray/set', false)
Message({
message: "取消注销操作"
});
});
},
clear(){
this.$store.commit("d2admin/gray/set", true);
MessageBox.confirm("清空缓存将重置所有个性化设置并退出到登录界面", "清空缓存", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
await this.$store.dispatch('d2admin/db/set', {
dbName: 'sys',
path: '',
value: '',
user: true
message: '取消注销操作'
})
window.location.reload()
})
},
clear () {
this.$store.commit('d2admin/gray/set', true)
MessageBox.confirm('清空缓存将重置所有个性化设置并退出到登录界面', '清空缓存', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.$store.commit('d2admin/gray/set', false)
localStorage.clear();
window.location.reload()
})
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
this.$store.commit('d2admin/gray/set', false)
Message({
message: "取消清除缓存操作"
});
});
message: '取消清除缓存操作'
})
})
},
comfirm(text,title,cancleText){
return new Promise((reject,resolve)=>{
this.$store.commit("d2admin/gray/set", true);
comfirm (text, title, cancleText) {
return new Promise((reject, resolve) => {
this.$store.commit('d2admin/gray/set', true)
MessageBox.confirm(text, title, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
await this.$store.commit("d2admin/gray/set", false);
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
await this.$store.commit('d2admin/gray/set', false)
resolve(true)
})
.catch(() => {
this.$store.commit("d2admin/gray/set", false);
Message({
message: cancleText
});
reject()
});
.catch(() => {
this.$store.commit('d2admin/gray/set', false)
Message({
message: cancleText
})
reject()
})
})
},
// 打开个人信息弹出框
openUserMsgDialog: function() {
console.log("aaaa");
openUserMsgDialog: function () {
console.log('aaaa')
}
}
};
}
</script>
<style scoped>
......@@ -165,7 +160,7 @@ export default {
}
.avatar-container {
display: inline-block;
align: center;
text-align: center;
}
.name-role {
font-size: 14px;
......
......@@ -7,7 +7,7 @@ import 'flex.css'
import '@/components'
// svg 图标
import '@/assets/svg-icons'
//指令
// 指令
import '@/directives'
// 功能插件
......@@ -31,7 +31,7 @@ export default {
// 事件传递
Vue.prototype.$event = new Vue()
// Element
Vue.use(ElementUI,{ size: 'medium', zIndex: 3000 })
Vue.use(ElementUI, { size: 'medium', zIndex: 3000 })
// 插件
Vue.use(pluginError)
Vue.use(pluginLog)
......
import util from '@/libs/util.js'
import router from '@/router'
import { AccountLogin } from '@api/sys.login'
import { AccountLogin } from '@api/sys.account'
export default {
namespaced: true,
actions: {
......@@ -36,6 +36,8 @@ export default {
await dispatch('d2admin/user/set', {
name: user.name
}, { root: true })
// 强制初始化基础数据
await dispatch('d2admin/base/init', null, { root: true })
// 用户登录后从持久化数据加载一系列的设置
await dispatch('load')
// 结束
......@@ -85,6 +87,8 @@ export default {
// await dispatch('d2admin/size/set', 'medium', { root: true })
// DB -> store 持久化数据加载全局尺寸
await dispatch('d2admin/size/load', null, { root: true })
// DB - > 初始化 基础数据
// await dispatch('d2admin/base/init', null, { root: true })
// // store 设置系统主色
// await dispatch('d2admin/color/set', process.env.VUE_APP_MAIN_COLOR)
// 后台接口 -> store
......
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-27 17:25:12
* @Last Modified by: limin
* @Last Modified time: 2019-08-29 00:53:59
* @Last Modified time: 2019-09-01 19:00:46
*/
import util from '@/libs/util.js'
import router from '@/router'
......@@ -57,7 +57,7 @@ export default {
return new Promise(async resolve => {
// 设置数据
dispatch('d2admin/db/set', {
dbName: 'sys',
dbName: 'database',
path: 'source',
value: state.source,
user: true
......@@ -99,7 +99,7 @@ export default {
return new Promise(async resolve => {
if (!state.source) {
state.source = await dispatch('d2admin/db/get', {
dbName: 'sys',
dbName: 'database',
path: 'source',
user: true
}, { root: true })
......
/*
* @Author: limin
* @Date: 2019-09-01 17:56:57
* @Last Modified by: limin
* @Last Modified time: 2019-09-01 18:57:45
*/
import { FetchRoleList, CompanyList, DepartList, StationList } from '@/api/sys.base'
import { BaseData } from '@/common/constants'
const map = {
[BaseData.ROLE]: FetchRoleList,
[BaseData.COMPANY]: CompanyList,
[BaseData.DEPART]: DepartList,
[BaseData.STATION]: StationList
}
export default {
namespaced: true,
state: {
// 所属公司
company: [],
// 角色
role: [],
// 部门
depart: [],
// 站点
station: []
},
actions: {
/**
* 初始化获取 基础数据 并 前端持久化
* 每次登录会强制 初始化
* @param {*} param0
*/
init ({ state, dispatch, commit }) {
return new Promise(async resolve => {
Promise.all([
FetchRoleList(),
CompanyList(),
DepartList(),
StationList()
]).then( async ([role, company, depart, station] = res) => {
state.role = role
state.station = station
state.depart = depart
state.company = company
await dispatch('save2db', {path: `base`,value: {role, company, depart, station}})
resolve({ role, company, depart, station })
})
})
},
/**
* 根据名字获取基础数据
* 获取步骤:
* 内存 -> 前端持久化数据库 -> 后台接口
* @param {*} param0
* @param {*} name 名称 state 中的任意一个 强烈建议 使用 @/common/constants/BaseData 中的常量 便于灵活修改
*/
get ({ state, dispatch }, name) {
return new Promise(async resolve => {
let __data = state[name]
if (!__data.length) {
__data = await dispatch('getFromdb', `base.${name}`) || await dispatch('getFromAjax', name)
state[name] = __data
await dispatch('save2db', {path: `base.${name}`,value: __data})
}
resolve(__data)
})
},
/**
* 获取所有基础数据
* 获取步骤:
* 内存 -> 前端持久化数据库 -> 后台接口
* @param {*} param0
*/
load ({ state,dispatch }) {
return new Promise(async resolve => {
if (state.role.length === 0) {
state = await dispatch('getFromdb','base') || await dispatch('init')
}
const {role, company, depart, station} = state
resolve({role, company, depart, station})
})
},
/**
* 内部方法 从前端持久化数据库 获取指定数据
* @param {*} param0
* @param {*} path 数据 路径
*/
getFromdb ({ dispatch }, path) {
return new Promise(async resolve => {
const value = await dispatch('d2admin/db/get', {
dbName: 'database',
path,
user: true
}, { root: true })
resolve(value)
})
},
/**
* 内部方法 前端持久化 一个 数据
* @param {*} param0
* @param {*} param1 value 需要持久化的数据 path 需要持久化的数据路径
*/
save2db ({ dispatch }, {value,path}) {
return new Promise(async resolve => {
await dispatch('d2admin/db/set', {
dbName: 'database',
path,
value,
user: true
}, { root: true })
resolve(value)
})
},
/**
* 从后端获取一个数据
* @param {*} param0
* @param {*} name @/common/constants/BaseData 中的常量
*/
getFromAjax ({ state, dispatch, commit }, name) {
return new Promise(async resolve => {
const value = await map[name]()
resolve(value)
})
}
},
mutations: {
}
}
......@@ -42,10 +42,10 @@ export default {
resolve()
})
},
clear ({ state, dispatch },) {
clear ({ state, dispatch }) {
return new Promise(async resolve => {
await dispatch('set',{})
await dispatch('set', {})
resolve()
})
}
......
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
......@@ -135,12 +135,12 @@ export default {
watch: {
isVisible (val) {
// this.disabled = this.editForm.trafficCode ? true : false
// this.disabled = this.editForm.trafficCode ? true : false
this.$refs.editRuleForm && this.$refs.editRuleForm.resetFields()
}
},
mounted() {},
mounted () {},
methods: {
......
......@@ -29,10 +29,10 @@
<el-col :span="12">物料列表</el-col>
<el-col :span="12" style="text-align: right">
<el-button class="import-button" style="">导入
<input
type="file"
class="import-input"
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
<input
type="file"
class="import-input"
accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
@change="importFile($event)" />
</el-button>
<el-button>导出</el-button>
......@@ -105,14 +105,14 @@
<script>
import EditDialog from './editDialog'
import { getListApi, editApi, removeApi, importApi, exportApi } from '@api/deviceManagement'
import { getListApi, editApi, removeApi, importApi, exportApi } from '@api/deviceManagement'
import notice from '@/common/notice'
export default {
name: 'deviceManagement',
components: {
EditDialog
},
data() {
data () {
return {
// 编辑弹窗
editVisible: false,
......@@ -139,32 +139,32 @@ export default {
tableLoading: false,
tableData: [],
tableColumns: [{
label: '物料代码',
prop: 'deviceNum'
label: '物料代码',
prop: 'deviceNum'
}, {
label: '物料编码',
prop: 'deviceCode'
label: '物料编码',
prop: 'deviceCode'
}, {
label: 'CRC物料号',
prop: 'crcCode'
label: 'CRC物料号',
prop: 'crcCode'
}, {
label: '图号',
prop: 'drawNum'
label: '图号',
prop: 'drawNum'
}, {
label: '物料名称',
prop: 'deviceName'
label: '物料名称',
prop: 'deviceName'
}, {
label: '规格',
prop: 'specifications'
label: '规格',
prop: 'specifications'
}, {
label: '所在地',
prop: 'stationName'
label: '所在地',
prop: 'stationName'
}, {
label: '库存',
prop: 'stockCount'
label: '库存',
prop: 'stockCount'
}, {
label: '责任人',
prop: 'responsible'
label: '责任人',
prop: 'responsible'
}],
// 页码
currentPage: 1,
......@@ -173,7 +173,7 @@ export default {
}
},
mounted() {
mounted () {
this.loadingGetList()
},
......@@ -202,7 +202,7 @@ export default {
})
},
editDevice(params) {
editDevice (params) {
editApi(params).then(res => {
// console.log(res)
this.handleEditClose()
......@@ -214,7 +214,7 @@ export default {
},
// 导入
importFile(e) {
importFile (e) {
const params = {
file: e.target.files[0]
}
......@@ -286,20 +286,20 @@ export default {
</script>
<style scoped>
.import-button {
width: 70px;
height: 40px;
overflow: hidden;
width: 70px;
height: 40px;
overflow: hidden;
position: relative;
cursor: pointer;
}
.import-input {
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 70px;
height: 100%;
cursor: pointer;
opacity: 0;
position: absolute;
left: 0;
top: 0;
width: 70px;
height: 100%;
cursor: pointer;
font-size:0
}
</style>
\ No newline at end of file
</style>
......@@ -15,24 +15,24 @@
<script>
export default {
name: 'DetailDialog',
data() {
data () {
return {
}
},
props: {
isVisible: {
type: Boolean,
default: false
type: Boolean,
default: false
}
},
mounted() {},
mounted () {},
methods: {
handleClose() {
this.$emit('closeDialog')
}
handleClose () {
this.$emit('closeDialog')
}
}
}
......@@ -43,4 +43,4 @@ export default {
font-size: 18px;
font-weight: bold;
}
</style>
\ No newline at end of file
</style>
......@@ -102,14 +102,14 @@
<script>
import DetailDialog from './detailDialog'
import { getListApi, detailApi, removeApi, downloadApi } from '@api/materiaOrderManagement'
import { getListApi, detailApi, removeApi, downloadApi } from '@api/materiaOrderManagement'
import notice from '@/common/notice'
export default {
name: 'materiaOrderManagement',
components: {
DetailDialog
},
data() {
data () {
return {
detailVisible: false,
// 搜索
......@@ -139,7 +139,7 @@ export default {
label: '状态',
prop: 'status',
formatter: (cellValue) => {
if (cellValue.status) {
if (cellValue.status) {
return {
1: '审批中',
2: '已驳回',
......@@ -157,8 +157,8 @@ export default {
}
},
mounted() {
this.loadingGetList()
mounted () {
this.loadingGetList()
},
methods: {
......@@ -184,7 +184,7 @@ export default {
this.tableLoading = false
})
},
editSubSystem(value) {
editSubSystem (value) {
const params = value
params.method = value.id ? methods.Edit : methods.Add
editApi(params).then(res => {
......@@ -261,4 +261,4 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
</style>
......@@ -67,95 +67,95 @@
</template>
<script>
import { getListApi } from '@api/materialList'
import { getListApi } from '@api/materialList'
import notice from '@/common/notice'
export default {
name: 'materialList',
data() {
data () {
return {
searchForm: {
keyWord: '',
responsible: '',
},
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '物料代码',
prop: 'deviceNum'
}, {
label: '物料编码',
prop: 'deviceCode'
}, {
label: 'CRC物料号',
prop: 'crcCode'
}, {
label: '图号',
prop: 'drawNum'
}, {
label: '物料名称',
prop: 'deviceName'
}, {
label: '规格',
prop: 'specifications'
}, {
label: '责任人',
prop: 'responsible'
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
responsible: ''
},
// 表格
tableLoading: false,
tableData: [],
tableColumns: [{
label: '物料代码',
prop: 'deviceNum'
}, {
label: '物料编码',
prop: 'deviceCode'
}, {
label: 'CRC物料号',
prop: 'crcCode'
}, {
label: '图号',
prop: 'drawNum'
}, {
label: '物料名称',
prop: 'deviceName'
}, {
label: '规格',
prop: 'specifications'
}, {
label: '责任人',
prop: 'responsible'
}],
// 页码
currentPage: 1,
pageSize: 10,
total: 30
}
},
mounted() {
mounted () {
this.loadingGetList()
},
methods: {
loadingGetList () {
this.tableLoading = true
this.getList()
this.tableLoading = true
this.getList()
},
/* 接口请求-start */
getParams () {
return {
pageCount: this.pageSize,
pageSize: this.currentPage,
...this.searchForm
}
return {
pageCount: this.pageSize,
pageSize: this.currentPage,
...this.searchForm
}
},
getList () {
const params = this.getParams()
getListApi(params).then(res => {
this.tableData = res
this.tableLoading = false
}).catch(err => {
notice.errorTips(err)
this.tableLoading = false
})
const params = this.getParams()
getListApi(params).then(res => {
this.tableData = res
this.tableLoading = false
}).catch(err => {
notice.errorTips(err)
this.tableLoading = false
})
},
/* 接口请求-end */
// 搜索
handleSearch () {
console.log(this.searchForm)
this.loadingGetList()
console.log(this.searchForm)
this.loadingGetList()
},
// 页码
handleSizeChange (value) {
console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
console.log(value)
this.pageSize = value
// 调接口
this.loadingGetList()
},
handleCurrentChange (value) {
console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
console.log(value)
this.currentPage = value
// 调接口
this.loadingGetList()
},
handleDelete (index, row) {
......@@ -167,8 +167,8 @@ export default {
console.log(index)
console.log(row)
this.$message({
type: 'success',
message: '删除成功'
type: 'success',
message: '删除成功'
})
}).catch(err => {})
}
......@@ -177,4 +177,4 @@ export default {
</script>
<style scoped>
</style>
\ No newline at end of file
</style>
......@@ -114,7 +114,7 @@ export default {
this.$refs.editRuleForm.resetFields()
}
},
methods: {
handleClose () {
this.$emit('closeDialog')
......
......@@ -80,13 +80,13 @@ export default {
watch: {
isVisible (val) {
this.disabled = this.editForm.trafficCode ? true : false
this.disabled = !!this.editForm.trafficCode
this.editForm.openType = this.editForm.trafficCode ? this.editForm.openType : '1'
this.$refs.editRuleForm && this.$refs.editRuleForm.resetFields()
}
},
mounted() {},
mounted () {},
methods: {
......
......@@ -164,7 +164,7 @@ export default {
}
},
mounted() {
mounted () {
this.loadingGetList()
},
......
......@@ -139,11 +139,11 @@ module.exports = {
args[0].cdn = cdn
return args
})
if (process.env.NODE_ENV === 'development') {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
if (process.env.NODE_ENV === 'development') {
config
.plugin('webpack-bundle-analyzer')
.use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin)
}
// 判断环境加入模拟数据
// const entry = config.entry('app')
// if (process.env.VUE_APP_BUILD_MODE !== 'nomock') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!