接入展板数据

This commit is contained in:
龙运模 2024-10-12 16:49:30 +08:00
parent febd3ae210
commit ea060b235e
3 changed files with 62 additions and 21 deletions

View File

@ -190,6 +190,13 @@ export default {
return await http.post(this.url, data); return await http.post(this.url, data);
}, },
}, },
select:{
url: `${config.API_URL}/customer.select.list`,
name: "客户下拉",
post: async function (data) {
return await http.post(this.url, data);
},
}
}, },
bom:{ bom:{
list:{ list:{

View File

@ -22,7 +22,7 @@
<text class="status" v-if="item.status">{{item.status}}</text> <text class="status" v-if="item.status">{{item.status}}</text>
{{item.title}} {{item.title}}
</div> </div>
<div class="com text">{{item.text}}</div> <div class="com text">{{item.content}}</div>
</div> </div>
</div> </div>
</el-scrollbar> </el-scrollbar>
@ -108,7 +108,7 @@ import barBox from "./components/bar";
import ringBox from "./components/ring"; import ringBox from "./components/ring";
import pointBox from "./components/point"; import pointBox from "./components/point";
import shortcuts from "./components/shortcuts"; import shortcuts from "./components/shortcuts";
import {eventBus} from "@/utils/eventBus"
export default { export default {
name: "index", name: "index",
components:{ components:{
@ -120,35 +120,54 @@ export default {
}, },
data(){ data(){
return{ return{
briefing:[ briefing:[
{num:189376,name:'数据采集条数',icon:'sc-icon-Gather'}, {num:189376,name:'待提交数',icon:'sc-icon-Gather'},
{num:12496,name:'维保待维修',icon:'sc-icon-HomeSetup'}, {num:12496,name:'计划维修数',icon:'sc-icon-HomeSetup'},
{num:756,name:'已维修工单',icon:'sc-icon-Repaired'}, {num:756,name:'正在维修数',icon:'sc-icon-Repaired'},
{num:97662,name:'预警工单',icon:'sc-icon-EarlyWarn'}, {num:97662,name:'待审核数',icon:'sc-icon-EarlyWarn'},
{num:3553,name:'个人中心',icon:'sc-icon-HomeUser'}, {num:3553,name:'个人中心',icon:'sc-icon-HomeUser'},
{num:253,name:'个人中心',icon:'sc-icon-HomeChart'}, {num:253,name:'个人中心',icon:'sc-icon-HomeChart'},
], ],
newList:[ newList:[
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审',status:'紧急'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审',status:'紧急'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审在今晚九点之前一定操作配合财务打款。',status:'紧急'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审在今晚九点之前一定操作配合财务打款。',status:'紧急'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审 在今晚九点之前一定操作,配合财务打款。',status:'紧急'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审 在今晚九点之前一定操作,配合财务打款。',status:'紧急'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
{title:'委派维修单审核',text:'单号:#SO20240112180910 单号审'}, {title:'委派维修单审核',content:'单号:#SO20240112180910 单号审'},
], ],
} }
}, },
mounted() { mounted() {
this.$emit('on-mounted') this.$emit('on-mounted');
//
eventBus.$on('sockBack', this.getWsResult);
},
unmounted() {
eventBus.$off('sockBack', this.getWsResult);
}, },
methods:{ methods:{
getWsResult(res){
if(res.data && (res.data.type == 21 || res.data.type == 22)){
if(res.data.type == 21){
this.briefing.forEach(item=>{
res.data.list_count_info.forEach(em=>{
if(item.name == em.title){
item.num = em.value
}
})
})
}
if(res.data.type == 22){
this.newList = res.data.list_backlog_info
}
}
}
} }
} }
</script> </script>

View File

@ -9,7 +9,9 @@
<el-row> <el-row>
<el-col :span="8" :lg="6"> <el-col :span="8" :lg="6">
<el-form-item label="报修客户" prop="customer"> <el-form-item label="报修客户" prop="customer">
<el-input class="input" type="text" v-model="form.customer" placeholder="请输入报修客户"></el-input> <el-select class="input" v-model="form.customer" @visible-change="getCustomerSelect('customer')" placeholder="请选择报修客户">
<el-option v-for="(item,index) in setMap['customer']" :key="index" :value="item.id" :label="item.customer_name"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" :lg="6"> <el-col :span="8" :lg="6">
@ -313,6 +315,19 @@ export default {
this.setMap[name] = res.data; this.setMap[name] = res.data;
} }
}, },
async getCustomerSelect(name){
let params = {
field:"customer_name",
id:{
operator:"in",
value:""
}
}
const res = await this.$API.setup.customer.select.post(params);
if(res.code == 200){
this.setMap[name] = res.data;
}
},
addOrder(){ addOrder(){
this.form.component_info.push({ this.form.component_info.push({
component_serial_no:"", component_serial_no:"",