|
@@ -42,19 +42,6 @@
|
|
|
</div>
|
|
|
<div class="react-right mr-4 react-l-s" style="width: 900px">
|
|
|
<span class="react-after"></span>
|
|
|
-
|
|
|
- <!-- <el-dropdown class="dropdown">
|
|
|
- <span class="el-dropdown-link" ref="echarType">
|
|
|
- {{linecode.LI_CODE}} <i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item class="dropdownitem"
|
|
|
- v-for="item in linedata"
|
|
|
- :key="item.LI_CODE"
|
|
|
- >{{item.LI_CODE}}</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>*/-->
|
|
|
-
|
|
|
<el-dropdown class="dropdown">
|
|
|
<span class="el-dropdown-link" ref="echarType">
|
|
|
产线看板<i class="el-icon-arrow-down el-icon--right"></i>
|
|
@@ -62,15 +49,24 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item class="dropdownitem"><router-link to="shop">车间看板</router-link></el-dropdown-item>
|
|
|
<el-dropdown-item class="dropdownitem"><router-link to="quality">品质看板</router-link></el-dropdown-item>
|
|
|
- <el-dropdown-item class="dropdownitem"><router-link to="device">设备看板</router-link></el-dropdown-item>
|
|
|
+<!-- <el-dropdown-item class="dropdownitem"><router-link to="device">设备看板</router-link></el-dropdown-item>-->
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <el-select v-model="linecode" class="dropdown" @change ="handleBlur" style="width: 150px">
|
|
|
+ <el-select v-model="factory" class="dropdown" @change ="handleBlur" style="width:80px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in factoryoptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <el-select v-model="linecode" class="dropdown" @change ="handleBlur1" style="width: 190px">
|
|
|
<el-option
|
|
|
v-for="item in linedata"
|
|
|
:key="item.LI_CODE"
|
|
|
- :label="item.LI_CODE"
|
|
|
+ :label="`${(item.LI_NAME)}(${(item.LI_CODE)})`"
|
|
|
:value="item.LI_CODE"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
@@ -123,12 +119,13 @@ import up2 from './up2'
|
|
|
import up3 from './up3'
|
|
|
import bottom1 from './bottom1'
|
|
|
import bottom2 from './bottom2'
|
|
|
-import { mapState } from "vuex"
|
|
|
+import {mapMutations, mapState} from "vuex"
|
|
|
|
|
|
export default {
|
|
|
mixins: [ drawMixin ],
|
|
|
computed: {
|
|
|
- ...mapState('user', ['user'])
|
|
|
+ //数组写法
|
|
|
+ ...mapState(['user','factoryoptions','factory']),
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -140,7 +137,7 @@ export default {
|
|
|
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
|
decorationColor: ['#568aea', '#000000'],
|
|
|
linecode:null,
|
|
|
- linedata:[]
|
|
|
+ linedata:[],
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -162,6 +159,7 @@ export default {
|
|
|
clearInterval(this.intervalId)
|
|
|
},
|
|
|
methods: {
|
|
|
+ ...mapMutations(['setFactory']),
|
|
|
timeFn() {
|
|
|
this.timing = setInterval(() => {
|
|
|
this.dateDay = formatTime(new Date(), 'HH: mm: ss')
|
|
@@ -175,25 +173,31 @@ export default {
|
|
|
}, 5000)
|
|
|
},
|
|
|
handleBlur (val){
|
|
|
+ this.setFactory(val);
|
|
|
+ location.reload();
|
|
|
+ },
|
|
|
+ handleBlur1 (val){
|
|
|
sessionStorage.setItem('li_code',val);
|
|
|
- this.$cookie.set("SMT_LI_CODE", val, {
|
|
|
- expires: 30,
|
|
|
- });
|
|
|
location.reload();
|
|
|
},
|
|
|
getLines (){
|
|
|
- this.$http.get("kanban/getLinesByWorkCenter.action").then(
|
|
|
+ this.$http.get("kanban/getLinesByFactory.action",{
|
|
|
+ params: {
|
|
|
+ fa_name: this.factory
|
|
|
+ }
|
|
|
+ }).then(
|
|
|
(res)=>{
|
|
|
if(res.data.linedata) {
|
|
|
const data = res.data.linedata;
|
|
|
- if(this.$cookie.get("SMT_LI_CODE") && data.some(item => item.LI_CODE === this.$cookie.get("SMT_LI_CODE")) ){
|
|
|
+ sessionStorage.setItem('li_code', data[0].LI_CODE);
|
|
|
+ /*if(this.$cookie.get("SMT_LI_CODE") && data.some(item => item.LI_CODE === this.$cookie.get("SMT_LI_CODE")) ){
|
|
|
sessionStorage.setItem('li_code', this.$cookie.get("SMT_LI_CODE"));
|
|
|
}else {
|
|
|
sessionStorage.setItem('li_code', data[0].LI_CODE);
|
|
|
this.$cookie.set("SMT_LI_CODE", data[0].LI_CODE, {
|
|
|
expires: 30,
|
|
|
});
|
|
|
- }
|
|
|
+ }*/
|
|
|
this.linedata = data;
|
|
|
}else{
|
|
|
sessionStorage.setItem('li_code','');
|