This commit is contained in:
2022-09-20 15:00:31 +08:00
8 changed files with 552 additions and 91 deletions

View File

@@ -1,49 +1,166 @@
import {post} from '@config/http.js' import {post} from '@config/http.js'
// import store from '../vuex/store' // import store from '../vuex/store'
/** 设备状态修改 */ /**
* 分拣管理
*/
// 1.1查询所有区域信息 // 1.查询分拣工单及明细(定时查询)
export const handArea = (type) => post('api/andxy2/hand/area', { export const sortingOrder = (reg) => post('api/hand/sortingOrder', {})
type: type // export const sortingOrder = () => {
})
// export const handArea = () => {
// let res = { // let res = {
// result: [
// {
// alloy: '',
// is_labeling: '1',
// type: 'order',
// order_status: '06',
// material_uuid: 'cf50d49e01424b2fb37d10ddfeae70f1',
// material_spec: '22.23',
// children: [
// {
// labeling_template: '15',
// color_type: '6',
// lettering_message: '77',
// type: 'orderDetail',
// order_code: '1',
// order_status: '00',
// cust_code: 'A00001',
// lettering_icon: '1',
// strap_number: '99',
// parent_order_code: '10000037',
// qty: '11',
// is_flag: '0',
// lettering_message2: '88',
// cust_name: 'A00001',
// parent_order_id: '907694f7e2de49bc943a8575ab5b3395',
// order_id: '57fbc012c50d4398b91142086d5445b6',
// cust_id: '092f1d84fddb417a914c8aa20d5bca81'
// }
// ],
// material_name: '直管14',
// wall_thickness: '0.20',
// is_coating: '1',
// jackup_num: '5',
// length: '4000.00',
// end_time: '',
// outer_diameter: '22.23',
// order_code: '10000037',
// start_time: '',
// temper: '',
// feeding_mouth: '3',
// is_strapping: '1',
// qty: '11',
// is_flag: '1',
// is_risking: '1',
// order_id: '907694f7e2de49bc943a8575ab5b3395',
// is_lettering: '1',
// material_code: 'A10014'
// },
// {
// alloy: '',
// is_labeling: '1',
// type: 'order',
// order_status: '01',
// material_uuid: 'cf50d49e01424b2fb37d10ddfeae70f1',
// material_spec: '22.23',
// children: [
// {
// labeling_template: '15',
// color_type: '7',
// lettering_message: '',
// type: 'orderDetail',
// order_code: '2',
// order_status: '05',
// cust_code: 'A00001',
// lettering_icon: '2',
// strap_number: '3',
// parent_order_code: '10000038',
// qty: '5555',
// is_flag: '0',
// lettering_message2: '33',
// cust_name: 'A00001',
// parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
// order_id: '1333a8a35df64432bb0e314d9636d2db',
// cust_id: '092f1d84fddb417a914c8aa20d5bca81'
// },
// {
// labeling_template: '14',
// color_type: '7',
// lettering_message: '',
// type: 'orderDetail',
// order_code: '1',
// order_status: '04',
// cust_code: 'A00002',
// lettering_icon: '1',
// strap_number: '1',
// parent_order_code: '10000038',
// qty: '5555',
// is_flag: '0',
// lettering_message2: '1',
// cust_name: 'A00002',
// parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
// order_id: '250354651d614a6dbc445e4089ce0e72',
// cust_id: '4b80d1c012e44027ad09b9f33ca7af0d'
// },
// {
// labeling_template: '15',
// color_type: '6',
// lettering_message: '55',
// type: 'orderDetail',
// order_code: '3',
// order_status: '05',
// cust_code: 'A00002',
// lettering_icon: '2',
// strap_number: '55',
// parent_order_code: '10000038',
// qty: '5555',
// is_flag: '0',
// lettering_message2: '5',
// cust_name: 'A00002',
// parent_order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
// order_id: 'e7356f2f443f499e8807bac8cfb3ddce',
// cust_id: '4b80d1c012e44027ad09b9f33ca7af0d'
// }
// ],
// material_name: '直管14',
// wall_thickness: '0.20',
// is_coating: '1',
// jackup_num: '5',
// length: '4000.00',
// end_time: '',
// outer_diameter: '22.23',
// order_code: '10000038',
// start_time: '',
// temper: '',
// feeding_mouth: '3',
// is_strapping: '1',
// qty: '5555',
// is_flag: '1',
// is_risking: '1',
// order_id: 'fb8f80bee3c9455c8a902e4911acf1ec',
// is_lettering: '1',
// material_code: 'A10014'
// }
// ],
// code: '1', // code: '1',
// desc: '', // desc: '查询成功'
// result: [{region_id: '1', region_name: 'a'}]
// } // }
// return res // return res
// } // }
// 2.下发刻字、贴标
// 1.2根据区域查询设备编号及状态 export const sendMessage = (type, uuid, ouuid) => post('api/hand/sendMessage', {
export const handPoint = (reg) => post('api/andxy2/hand/point', {
region: reg
})
// 1.3修改设备状态
export const handDeviceStatus = (code, type, no, mtype, quantity, remark) => post('api/andxy2/hand/deviceStatus', {
device_code: code,
type: type, type: type,
status: no, orderDetail_uuid: uuid,
material_type: mtype, order_uuid: ouuid
quantity: quantity,
remark: remark
}) })
// 3.下发设备信号
// 1.4查询物料 export const deviceOperation = (type) => post('api/hand/deviceOperation', {
export const handMatrial = () => post('api/andxy2/hand/matrial', {}) type: type
/** 普通任务 */
// 1.1创建任务
export const handTask = (scode, ncode) => post('api/andxy2/hand/task2', {
start_devicecode: scode,
next_devicecode: ncode
}) })
// 4.工单操作
/** 特殊任务 */ export const orderOperation = (type, uuid, ouuid) => post('api/hand/orderOperation', {
export const spehandTask = (scode, ncode) => post('api/andxy2/hand/task', { type: type,
start_devicecode: scode, orderDetail_uuid: uuid,
next_devicecode: ncode order_uuid: ouuid
}) })

View File

@@ -1,13 +1,9 @@
import axios from 'axios' import axios from 'axios'
// import qs from 'qs' import { Dialog, toast } from './utils.js'
import { Dialog } from './utils.js'
// import { Dialog, toast } from './utils.js'
import store from '../vuex/store' import store from '../vuex/store'
// import router from './../router' import router from '@/router'
axios.defaults.timeout = 50000 axios.defaults.timeout = 50000
// axios.defaults.retry = 5
// axios.defaults.retryDelay = 10000
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
axios.interceptors.request.use( axios.interceptors.request.use(
@@ -29,49 +25,23 @@ axios.interceptors.request.use(
axios.interceptors.response.use( axios.interceptors.response.use(
response => { response => {
return Promise.resolve(response) if (response.status === 200) {
return Promise.resolve(response)
} else {
return Promise.reject(response)
}
}, },
error => { error => {
// let condata = error.config.data.split('&') if (error && error.response) {
// console.log('condata', condata) switch (error.response.status) {
// if (condata[1] === '_SRVMETHOD=queryProduceOrderReprot' || condata[1] === '_SRVMETHOD=queryQCRecord' || condata[1] === '_SRVMETHOD=queryEquipWorkTeam') { case 401:
// toast(error.message) toast(error.response.data.message)
// setTimeout(() => { store.dispatch('setSignOut')
// router.replace({ router.push('/login')
// path: '/login' break
// }) }
// }, 10000) }
// } else {
// if (condata[1] === '_SRVMETHOD=queryEquip') {
// toast(error.message)
// } else {
// Dialog(error.message)
// }
// // Dialog(error.message)
// }
// toast(error.message)
// - 20201215-x
// router.push({
// path: '/500',
// query: {redirect: router.currentRoute.fullPath}
// })
// - 20201215-x
return Promise.reject(error) return Promise.reject(error)
// let config = error.config
// if (!config || !config.retry) return Promise.reject(error)
// config.__retryCount = config.__retryCount || 0
// if (config.__retryCount >= config.retry) {
// return Promise.reject(error)
// }
// config.__retryCount += 1
// let backoff = new Promise(resolve => {
// setTimeout(() => {
// resolve()
// }, config.retryDelay || 1)
// })
// return backoff.then(() => {
// return axios(config)
// })
} }
) )
@@ -79,11 +49,9 @@ export const post = (sevmethod, params) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
axios.post(`${store.getters.baseUrl}/` + sevmethod, params) axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
.then(response => { .then(response => {
// if (response.data.code === '0') {
// Dialog(response.data.desc)
// }
resolve(response.data) resolve(response.data)
}, error => { }, error => {
Dialog(error.message)
reject(error.message) reject(error.message)
}) })
.catch((error) => { .catch((error) => {

View File

@@ -33,8 +33,8 @@
<button v-show="showBtn1" class="iconfont login_icon delete_icon" @click="clearData(1)"></button> <button v-show="showBtn1" class="iconfont login_icon delete_icon" @click="clearData(1)"></button>
</div> </div>
<div class="inputOuter"> <div class="inputOuter">
<!-- <input type="text" placeholder="图片域名地址" class="inputStyle" v-model="imgBaseUrl"> <input type="number" placeholder="刷新时间(秒)" class="inputStyle" v-model="setTime">
<button v-show="showBtn2" class="iconfont login_icon delete_icon" @click="clearData(2)"></button> --> <button v-show="showBtn2" class="iconfont login_icon delete_icon" @click="clearData(2)"></button>
</div> </div>
</div> </div>
<div class="submit"> <div class="submit">
@@ -57,6 +57,7 @@ export default {
password: '', password: '',
baseUrl: this.$store.getters.baseUrl, baseUrl: this.$store.getters.baseUrl,
imgBaseUrl: this.$store.getters.imgBaseUrl, imgBaseUrl: this.$store.getters.imgBaseUrl,
setTime: this.$store.getters.setTime / 1000,
inputType: 'password', inputType: 'password',
eyeOpen: true, eyeOpen: true,
drift: 0, drift: 0,
@@ -71,7 +72,7 @@ export default {
return this.baseUrl !== '' return this.baseUrl !== ''
}, },
showBtn2 () { showBtn2 () {
return this.imgBaseUrl !== '' return this.setTime !== ''
}, },
showBtn3 () { showBtn3 () {
return this.loginname !== '' return this.loginname !== ''
@@ -126,7 +127,7 @@ export default {
this.baseUrl = '' this.baseUrl = ''
break break
case 2: case 2:
this.imgBaseUrl = '' this.setTime = ''
break break
case 3: case 3:
this.loginname = '' this.loginname = ''
@@ -144,7 +145,7 @@ export default {
_config () { _config () {
let obj = { let obj = {
baseUrl: this.baseUrl, baseUrl: this.baseUrl,
imgBaseUrl: this.imgBaseUrl setTime: this.setTime * 1000
} }
this.$store.dispatch('setConfig', obj) this.$store.dispatch('setConfig', obj)
this._tabChange(0) this._tabChange(0)

View File

@@ -17,6 +17,7 @@
<div class="menu"> <div class="menu">
<ul> <ul>
<li @click="toSure('zlmanage')">指令管理</li> <li @click="toSure('zlmanage')">指令管理</li>
<li @click="toSure('SortingManage')">分拣管理</li>
<li @click="toSure('SignalSend')">信号下发</li> <li @click="toSure('SignalSend')">信号下发</li>
</ul> </ul>
</div> </div>

View File

@@ -0,0 +1,362 @@
<template>
<div class="inner-wrap">
<nav-bar title="分拣管理"></nav-bar>
<div class="wrap2">
<div class="wrap-filter-button">
<div class="wrap-button clearfix">
<button class="button--primary" :disabled="disabled3" @click="toSure1">设备暂停</button>
<button class="button--primary" :disabled="disabled4" @click="toSure2">设备恢复</button>
<button class="button--primary" :disabled="disabled5" @click="toSure3">急停</button>
<button class="button--primary" :disabled="disabled6" @click="toSure4">清料</button>
<button class="button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled1" @click="toSendMessage1">手动下发刻字信息</button>
<button class="button--primary" :class="{'button--defalut': pkId === ''}" :disabled="disabled2" @click="toSendMessage2">手动下发贴标信息</button>
</div>
</div>
<section class="grid-wraper mgt15">
<div class="slide_new">
<table>
<thead>
<tr>
<th>选择</th>
<th>工单明细</th>
<th>工单明细状态</th>
<th>物料编码</th>
<th>物料名称</th>
<th>外径</th>
<th>壁厚</th>
<th>长度</th>
<th>下料数量</th>
<th>客户编码</th>
<th>客户名称</th>
<th>当前上料数量</th>
<th>当前上料合格数量</th>
<th>当前刻字数量</th>
<th>当前刻字合格数量</th>
<th>当前套冒数量</th>
<th>当前套冒合格数量</th>
<th>当前捆扎包数</th>
<th>当前捆扎数</th>
<th>当前裹膜数量</th>
<th>当前裹膜合格数量</th>
<th>当前贴标数量</th>
<th>上料完成</th>
<th>刻字完成</th>
<th>套冒完成</th>
<th>捆扎完成</th>
<th>裹膜完成</th>
<th>贴标完成</th>
<th>创建者</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.order_id">
<td @click="toCheck(e)"><div v-show="e.pid !== 0" class="iconfont select_icon" :class="e.order_id === pkId ? 'selected_icon' : 'unselect_icon'"></div></td>
<td>
<div class="td_detail" @click="showSec(e, i)">
<p>{{e.order_code}}</p>
<div v-show="e.pid === 0" class="iconfont table_dropdown_icon" :class="{'rotate180': e.childShow}"></div>
</div>
</td>
<td>{{['就绪', '已确认', '已下发', '执行中', '下发工单暂停 05-工单暂停', '下发强制完成', '强制完成', '自动完成', '取消'][Number(e.order_status)]}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.outer_diameter}}</td>
<td>{{e.wall_thickness}}</td>
<td>{{e.length}}</td>
<td>{{e.qty}}</td>
<td>{{e.cust_code}}</td>
<td>{{e.cust_name}}</td>
<td>{{e.present_feeding_number}}</td>
<td>{{e.feeding_qualified_number}}</td>
<td>{{e.present_lettering_number}}</td>
<td>{{e.qualified_lettering_number}}</td>
<td>{{e.present_sleeveing_number}}</td>
<td>{{e.qualified_sleeveing_number}}</td>
<td>{{e.present_strap_pack_number}}</td>
<td>{{e.present_strap_number}}</td>
<td>{{e.present_wraping_number}}</td>
<td>{{e.qualified_wraping_number}}</td>
<td>{{e.present_labeling_number}}</td>
<td>{{['未完成', '完成', '强制完成'][Number(e.feeding_finished)]}}</td>
<td>{{e.lettering_finished}}</td>
<td>{{e.sleeveing_finished}}</td>
<td>{{['未完成', '完成', '强制完成'][Number(e.strap_finished)]}}</td>
<td>{{['未完成', '完成', '强制完成'][Number(e.wraping_finished)]}}</td>
<td>{{['未完成', '完成', '强制完成'][Number(e.labeling_finished)]}}</td>
<td>{{e.create_by}}</td>
<td>{{e.create_time}}</td>
<td>
<button v-show="e.pid === 0" class="button--primary button--cancle button_table_font" :disabled="disabled7" @click="toOrderOperation1(e)">强制完成工单</button>
<button v-show="e.pid !== 0" class="button--primary button--cancle button_table_font" :disabled="disabled8" @click="toOrderOperation2(e)">手动完成</button>
<button v-show="e.pid !== 0" class="button--primary button--cancle button_table_font" :disabled="disabled9" @click="toOrderOperation3(e)">强制完成明细</button>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</div>
</template>
<script>
import NavBar from '@components/NavBar.vue'
import {sortingOrder, sendMessage, deviceOperation, orderOperation} from '@config/getData2.js'
export default {
name: 'SortingManage',
components: {
NavBar
},
data () {
return {
interTime: this.$store.getters.setTime,
timer: null,
dataList: [],
newList: [],
pkId: '',
pkObj: {},
disabled1: false,
disabled2: false,
disabled3: false,
disabled4: false,
disabled5: false,
disabled6: false,
disabled7: false,
disabled8: false,
disabled9: false
}
},
created () {
this.refresh()
},
beforeDestroy () {
clearInterval(this.timer)
this.timer = null
},
methods: {
refresh () {
this.sortingOrder()
this.timer = setInterval(() => {
this.sortingOrder()
}, this.interTime)
},
showSec (e, i) {
e.childShow = !e.childShow
if (e.childShow) {
if (e.children.length > 0) {
e.children.map((el, j) => {
let obj = Object.assign({}, e, el, {children: [], pid: j + 1})
this.dataList.splice(i + j + 1, 0, obj)
})
}
} else {
if (e.children.length > 0) {
this.dataList.splice(i + 1, e.children.length)
}
}
},
toCheck (e) {
this.pkId = this.pkId === e.order_id ? '' : e.order_id
this.pkObj = this.pkId === e.order_id ? e : {}
},
/** 查询分拣工单及明细(定时查询) */
async sortingOrder () {
let res = await sortingOrder()
if (res.code === '1') {
this.dataList = [...res.result]
this.dataList.map(el => {
this.$set(el, 'pid', 0)
this.$set(el, 'childShow', false)
})
} else {
this.Dialog(res.desc)
}
},
/** 下发刻字、贴标 */
async _sendMessage (type, uuid, ouuid) {
try {
let res = await sendMessage(type, uuid, ouuid)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}
this.disabled1 = false
this.disabled2 = false
} catch (err) {
this.Dialog(err)
this.disabled1 = false
this.disabled2 = false
}
},
toSendMessage1 () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
this._sendMessage('1', this.pkObj.order_code, this.pkObj.order_id)
},
toSendMessage2 () {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
this._sendMessage('2', this.pkObj.order_code, this.pkObj.order_id)
},
/** 下发设备信号 */
async _deviceOperation (type) {
try {
let res = await deviceOperation(type)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}
this.disabled3 = false
this.disabled4 = false
this.disabled5 = false
this.disabled6 = false
} catch (err) {
this.Dialog(err)
this.disabled3 = false
this.disabled4 = false
this.disabled5 = false
this.disabled6 = false
}
},
toSure1 () {
this.disabled3 = true
this._deviceOperation('1')
},
toSure2 () {
this.disabled4 = true
this._deviceOperation('2')
},
toSure3 () {
this.disabled5 = true
this._deviceOperation('3')
},
toSure4 () {
this.disabled6 = true
this._deviceOperation('4')
},
/** 工单操作 */
async _orderOperation (type, uuid, ouuid) {
try {
let res = await orderOperation(type, uuid, ouuid)
if (res.code === '1') {
this.toast(res.desc)
clearInterval(this.timer)
this.timer = null
this.refresh()
} else {
this.Dialog(res.desc)
}
this.disabled7 = false
this.disabled8 = false
this.disabled9 = false
} catch (err) {
this.Dialog(err)
this.disabled7 = false
this.disabled8 = false
this.disabled9 = false
}
},
toOrderOperation1 (e) {
this.disabled7 = true
this._orderOperation('2', e.order_code, e.order_id)
},
toOrderOperation2 (e) {
this.disabled8 = true
this._orderOperation('3', e.order_code, e.order_id)
},
toOrderOperation3 (e) {
this.disabled9 = true
this._orderOperation('4', e.order_code, e.order_id)
}
}
}
</script>
<style lang="stylus" scoped>
@import '~@style/mixin.styl'
.wrap-filter-button
padding 0.05rem 0.2rem
margin 0
.wrap-button
margin 0.01rem auto
.grid-wraper
_wh(100%, 100%)
overflow-y scroll
box-sizing border-box
.slide_new
table
table-layout fixed
min-width 100%
border-collapse separate
border-spacing 0
border 0
td, th
box-sizing border-box
overflow hidden
white-space nowrap
text-overflow ellipsis
white-space nowrap
padding 0 .15rem
border-bottom .05rem solid #f5f5f5
&:first-child
position sticky
left 0
&:nth-child(2)
position sticky
left .4rem
&:last-child
position sticky
right 0
thead
tr
th
position sticky
top 0
z-index 99
background #d7d7d7
_font(.13rem, .5rem, #696969, bold)
border-right .01rem dashed #fff
&:first-child
z-index 1
background #d7d7d7
&:nth-child(2)
z-index 2
background #d7d7d7
&:last-child
border-right none
tbody
tr
td
_font(.13rem, .5rem, #323232)
background #fff
border-right .01rem dashed #d7d7d7
&:last-child
border-right none
.td_detail
_fj(flex-start)
.table_dropdown_icon
_wh(.2rem, .2rem)
_font(.13rem, .2rem, #c0c4cc,,center)
margin-left .1rem
&::before
content: '\e62b'
.rotate180
transform rotate(-180deg)
transition transform 0.3s
</style>

View File

@@ -6,6 +6,7 @@ const Login = r => require.ensure([], () => r(require('@page/Login')), 'Login')
const ZlManage = r => require.ensure([], () => r(require('@page/proj/ZlManage')), 'ZlManage') const ZlManage = r => require.ensure([], () => r(require('@page/proj/ZlManage')), 'ZlManage')
const HomePage = r => require.ensure([], () => r(require('@page/proj/HomePage')), 'HomePage') const HomePage = r => require.ensure([], () => r(require('@page/proj/HomePage')), 'HomePage')
const SignalSend = r => require.ensure([], () => r(require('@page/proj/SignalSend')), 'SignalSend') const SignalSend = r => require.ensure([], () => r(require('@page/proj/SignalSend')), 'SignalSend')
const SortingManage = r => require.ensure([], () => r(require('@page/proj/SortingManage')), 'SortingManage')
Vue.use(Router) Vue.use(Router)
@@ -31,6 +32,10 @@ export default new Router({
{ {
path: '/SignalSend', path: '/SignalSend',
component: SignalSend component: SignalSend
},
{
path: '/SortingManage',
component: SortingManage
} }
] ]
}) })

View File

@@ -71,16 +71,19 @@
line-height .3rem line-height .3rem
font-size .15rem font-size .15rem
color #ffffff color #ffffff
border 1px solid #D7592F
background-color #D7592F background-color #D7592F
padding 0 .1rem padding 0 .1rem
border-radius 5px border-radius 5px
.button--defalut .button--defalut
color #606266 color #606266
border 1px solid #dcdfe6 border 1px solid #dcdfe6
background-color #fff background-color #dcdfe6
.button--cancle .button--cancle
color #D7592F color #D7592F
background-color #fff background-color #fff
.button_table_font
font-size .13rem
.top_header .top_header
position fixed position fixed
top 0 top 0

View File

@@ -5,6 +5,7 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.155:
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.100/' : 'http://192.168.46.5/' const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.100/' : 'http://192.168.46.5/'
const state = { const state = {
baseUrl: getStore('baseUrl') || baseUrl, baseUrl: getStore('baseUrl') || baseUrl,
setTime: getStore('setTime') || 5000,
imgBaseUrl: getStore('imgBaseUrl') || imgBaseUrl, imgBaseUrl: getStore('imgBaseUrl') || imgBaseUrl,
lockTime: getStore('lockTime') || 0, lockTime: getStore('lockTime') || 0,
loading: false, loading: false,
@@ -18,6 +19,7 @@ const state = {
const getters = { const getters = {
baseUrl: state => state.baseUrl, baseUrl: state => state.baseUrl,
setTime: state => state.setTime,
imgBaseUrl: state => state.imgBaseUrl, imgBaseUrl: state => state.imgBaseUrl,
lockTime: state => state.lockTime, lockTime: state => state.lockTime,
loading: state => state.loading, loading: state => state.loading,
@@ -28,6 +30,7 @@ const getters = {
const actions = { const actions = {
setConfig ({commit}, res) { setConfig ({commit}, res) {
setStore('baseUrl', res.baseUrl) setStore('baseUrl', res.baseUrl)
setStore('setTime', res.setTime)
setStore('imgBaseUrl', res.imgBaseUrl) setStore('imgBaseUrl', res.imgBaseUrl)
setStore('lockTime', res.lockTime) setStore('lockTime', res.lockTime)
commit(types.COM_CONFIG, res) commit(types.COM_CONFIG, res)
@@ -58,6 +61,7 @@ const actions = {
const mutations = { const mutations = {
[types.COM_CONFIG] (state, res) { [types.COM_CONFIG] (state, res) {
state.baseUrl = res.baseUrl state.baseUrl = res.baseUrl
state.setTime = res.setTime
state.imgBaseUrl = res.imgBaseUrl state.imgBaseUrl = res.imgBaseUrl
state.lockTime = res.lockTime state.lockTime = res.lockTime
}, },