Commit 17cf57b2 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents f6067124 6737751d
......@@ -9,7 +9,7 @@
<p class="dispatch_part_top">
<b class="mr10">设备列表</b>
{{listSheBei.length}}
<!-- {{ids}} -->
<span style="display:none">{{ids}}</span>
</p>
<div class="dispatch_part_body" :style="{height:byheight}">
<h4 class="tc" v-if="this.listSheBei.length==0">暂无数据</h4>
......@@ -33,12 +33,13 @@
<p class="show_btn">
<a @click="showRow(item.id,item.btnShow)">
<Tooltip content="所属程序列表">
<Icon v-if="btnModal" type="ios-arrow-down" />
<Icon v-if="item.btnShow" type="ios-arrow-down" />
<Icon v-else type="ios-arrow-up" />
</Tooltip>
</a>
</p>
<div class="h60" v-if="!btnModal">
<div class="h60" v-if="item.btnShow">
<span style="display:none"> {{liOrderIds}} </span>
<Row class="card_body02" v-for="(li,index) in item.row" :key="index">
<Col span="8" class="dispatch_li">
<Checkbox v-model="li.checked">程序名:{{li.mdcNmae}}</Checkbox>
......@@ -46,7 +47,6 @@
<Col span="8" class="dispatch_li">大小:{{li.size}}</Col>
<Col span="8" class="dispatch_li">下载时间:{{li.downTime}}</Col>
</Row>
<!-- {{liOrderIds}} -->
</div>
</div>
</div>
......@@ -100,7 +100,7 @@
</Modal>
<!-- 底部 -->
<FooterToolbar style="height:65px" v-show="showOperate&&footerToolbar">
<!-- <span>已选程序:{{chengXuIds.length}}</span> -->
<!-- <span v-if="beyong">已选程序:{{chengXuIds.length}}</span> -->
<Button class="span ml20" type="primary" v-if="xiaZai" @click="downFile">下载</Button>
<Button class="span ml20" type="primary" v-if="beyong" @click="fileBeyong">文本对比</Button>
<Button @click="footerToolbar=false">取消</Button>
......@@ -200,21 +200,19 @@ export default {
{
mdcNmae: "00123_281",
id:101,
size: "128Mb",
size: "120Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
},{
mdcNmae: "00123_282",
id:102,
size: "128Mb",
size: "133Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
},{
mdcNmae: "00123_283",
id:103,
size: "128Mb",
size: "100Mb",
downTime: "2020-05-26 10:30:26",
checked: false
}
......@@ -230,25 +228,59 @@ export default {
id: 2,
row: [
{
mdcNmae: "00123_281",
mdcNmae: "00123_284",
id:201,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_282",
},{
mdcNmae: "00123_285",
id:202,
size: "128Mb",
size: "118Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},
{
mdcNmae: "00123_283",
},{
mdcNmae: "00123_286",
id:203,
size: "100Mb",
downTime: "2020-05-26 10:30:26",
checked: false
}
]
},{
dncCode: "19212_0665003",
dncName: "数控机床03",
dncUser: "刘蕾",
dncArea: "区域03",
dncStatue: "空闲",
checked: false,
btnShow: false,
id: 3,
row: [
{
mdcNmae: "00123_287",
id:201,
size: "128Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},{
mdcNmae: "00123_288",
id:202,
size: "110Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},{
mdcNmae: "00123_289",
id:203,
size: "130Mb",
downTime: "2020-05-26 10:30:26",
checked: false
},{
mdcNmae: "00123_290",
id:203,
size: "135Mb",
downTime: "2020-05-26 10:30:26",
checked: false
}
]
}
......@@ -292,7 +324,6 @@ export default {
endTime: "2020/05/26 "
}
],
btnModal: true,//箭头
listTitle: [], //订单号列表
newList: [], //选中数据
chaiModal: false, //拆分弹框
......@@ -386,14 +417,12 @@ export default {
this.footerToolbar = true;
},
// 切换箭头
showRow(id,btn){
// console.log(id)
// let ss=!btnModal
// this.listSheBei.map(u=>{
// })
// console.log(btnModal = ss)
this.btnModal = !this.btnModal
showRow(rowid,btn){
this.listSheBei.map(u=>{
if(u.id==rowid){
u.btnShow = !u.btnShow
}
})
},
// 获取查询人员
getselectuser(id) {
......@@ -472,7 +501,7 @@ export default {
this.getUserInfoFn();
},
downFile(){
this.$Message.success("下载文件")
this.$Message.success("下载文件中...")
},
fileBeyong(){
this.$Message.success("对比文件")
......@@ -609,8 +638,13 @@ export default {
}
});
if (ids.length > 0) {
this.footerToolbar = true;
this.xiaZai = true;
// if(this.liOrderIds.length>0){
// this.$Message.info("设备和所属程序不能同时选择!")
// }else{
this.footerToolbar = true;
this.xiaZai = true;
this.beyong = false;
// }
}
return ids;
},
......@@ -633,23 +667,35 @@ export default {
return orders;
},
liOrderIds() {
let liOrderIds = [];
let rowList ;
this.listSheBei.map(u => { rowList = u.row });
// rowList.map(item=>{ rowData.push(item) })
// rowList.map(tm=>{
// if(tm.checked){
// liOrderIds.push(tm.id)
// }
// })
let rowList = [] ;
let liOrderIds = [] ;
let cardData = this.listSheBei;
for(let i=0;i<cardData.length;i++){
cardData[i].row.map(u=>{
rowList.push(u)
})
}
rowList.map(tem => {
if (tem.checked) {
liOrderIds.push(tem.id);
}
});
if(liOrderIds.length > 0){
if(this.ids.length > 0){
this.$Message.info("设备和所属程序不能同时选择!")
this.footerToolbar = false;
}else{
this.footerToolbar = true;
this.xiaZai = false;
this.beyong = true;
}
}
return liOrderIds;
// this.footerToolbar = true;
return rowList;
},
showOperate() {
return (
this.ids.length > 0 && (this.chengXuIds.length > 0 )
// || this.liOrderIds.length > 0
(this.ids.length > 0 || this.liOrderIds.length > 0) && (this.chengXuIds.length > 0 )
);
}
},
......
<template>
<div>
<div id="myChart03" style="width:865px;height:516px;top: 0px;"></div>
<div id="myChart03" style="width:865px;height:316px;top: 0px;"></div>
</div>
</template>
<script>
......
<template>
<div>
<div id="myChart04" style="width:100%;height:340px;margin:20px auto;top: 0px;"></div>
<div id="gauge01" style="width:200px;height:150px;top: 0px;"></div>
</div>
</template>
<script>
......@@ -17,61 +17,141 @@ export default {
},
loadEchart() {
// 基于准备好的dom,初始化echarts实例
var myChart04 = this.$echarts.init(document.getElementById('myChart04'))
var gauge01 = this.$echarts.init(document.getElementById('gauge01'))
var score = 78;
var name = '名称';
var option = {
title: {
text: ''
},
legend: {
data: ['开机', '关机', '故障', '运行'],
right: 55,
},
tooltip: {
trigger: 'axis'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
data: ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日',
'14日', '15日', '16日', '17日', '18日']
},
yAxis: {
type: 'value'
},
series: [
series: [
{
name: '开机',
type: 'bar',
barWidth: 8,
data: [120, 132, 101, 134, 90, 230, 210,120, 132, 101, 134, 90, 230, 210,120, 132, 101, 134]
type: 'gauge',
min: 0,
max: 100,
radius: '80%',
startAngle: 180,
endAngle: 0,
axisLine: {
show: false,
lineStyle: {
opacity: 0,
width: 12
}
},
splitLine: {
show: false
},
pointer: {
show: false
},
axisTick: {
splitNumber: 10,
length: 12,
lineStyle: {
color: '#004fb0'
}
},
title: {
show: true,
fontSize: 16,
color: '#5faeff',
offsetCenter: [0, '-115%']
},
detail: {
formatter: function (value) {
return '{a|' + value + '} {b|分}'
},
offsetCenter: [0,-20],
rich: {
a: {
fontSize: 32,
color: '#15e198'
},
b: {
fontSize: 14,
color: '#15e198',
padding: [0, 0, 5, 0]
}
}
},
data: [{value: [score], name: name}]
},
{
name: '关机',
type: 'bar',
barWidth: 8,
data: [220, 182, 191, 234, 290, 330, 310,220, 182, 191, 234, 290, 330, 310,220, 182, 191, 234, 290, 330, 310]
name: 'score',
type: 'pie',
startAngle: 180,
hoverAnimation: false,
radius: [105, 115],
label: {
normal: {
show: false
}
},
data: [
{
value: 0.4,
name: 0.4,
itemStyle: {
normal: {
color: '#fff'
}
}
},
{
value: 0.4,
itemStyle: {
normal: {
color: 'transparent'
}
}
}
]
},
{
name: '故障',
type: 'bar',
barWidth: 8,
data: [150, 232, 201, 154, 190, 330, 410,150, 232, 201, 154, 190, 330, 410,150, 232, 201, 154, 190, 330, 410]
},
{
name: '运行',
type: 'bar',
barWidth: 8,
data: [320, 332, 301, 334, 390, 330, 320,320, 332, 301, 334, 390, 330, 320,320, 332, 301, 334, 390, 330, 320]
name: 'score',
type: 'pie',
startAngle: 180,
hoverAnimation: false,
radius: [105, 115],
label: {
normal: {
show: false
}
},
data: [
{
value: [(score * 0.5 /100).toFixed(2)],
name: [(score * 0.5 /100).toFixed(2)],
itemStyle: {
normal: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0, color: '#15e198'
}, {
offset: 1, color: '#409eff'
}]
}
}
}
},
{
value: [1- (score * 0.5 /100).toFixed(2)],
itemStyle: {
normal: {
color: 'transparent'
}
}
}
]
}
]
]
}
// 绘制图表
myChart04.setOption(option)
gauge01.setOption(option)
}
},
mounted() {
......
......@@ -58,7 +58,7 @@
</div>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" v-for="i of 15" :key="i">
<div class="body" v-for="i of 5" :key="i">
<Row class="title-i">
<Col :span="16" class="order-code">
<Ellipsis :text="row.productName+i" :lines="1" tooltip transfer />
......
.set_card{
padding: 30px 30px 0;
padding: 12px 30px 0;
.set_card_box{
border: 1px solid #CACBD0;
border-radius: 4px;
......
......@@ -105,6 +105,7 @@
<Col span="16">
<div class="echart3">
<Echart3 ></Echart3>
<Echart4 ></Echart4>
</div>
</Col>
<Col span="8">
......@@ -163,10 +164,12 @@
<script>
import Echart2 from './compose/echart2'
import Echart3 from './compose/echart3'
import Echart4 from './compose/echart4'
export default {
components: {
Echart2,
Echart3,
Echart4,
},
data(){
return{
......
......@@ -257,7 +257,7 @@ export default {
action: 1,
add: 0 //新增标识
};
this.checkList.unshift(obj);
this.checkList.push(obj);
},
handleSubmit() {
this.$refs.form.validate(v => {
......
......@@ -254,7 +254,7 @@ export default {
action: 1,
add: 0 //新增标识
};
this.checkList.unshift(obj);
this.checkList.push(obj);
},
handleSubmit() {
this.$refs.form.validate(v => {
......
......@@ -25,7 +25,15 @@
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
<!-- <Input v-model="entity.version" placeholder="请输入"></Input> -->
<Dictionary
code="material.main.version"
disabled
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -47,7 +55,7 @@
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker
v-if="li.dataType==4"
v-model="entity[li.field]"
......@@ -58,7 +66,12 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......@@ -84,6 +97,7 @@ export default {
entity: {
code: 0,
status: 0,
version: 0,
codeRuleId: this.nodeInfo.codeRuleId,
categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {},
......
......@@ -25,7 +25,15 @@
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
<!-- <Input v-model="entity.version" placeholder="请输入"></Input> -->
<Dictionary
code="material.main.version"
disabled
v-model="entity.version"
type="select"
:value="entity.version"
:key="entity.version"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -47,7 +55,7 @@
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker
v-if="li.dataType==4"
v-model="entity[li.field]"
......@@ -58,7 +66,12 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......
......@@ -7,6 +7,7 @@
:action="action"
:initsearch="sets"
:high="false"
:format="formatFun"
:height="tableHeight"
@on-selection-change="onSelect"
>
......@@ -132,7 +133,8 @@ export default {
{
key: "version",
title: "版本",
align: "left"
align: "left",
code: "material.main.version"
},
{
key: "description",
......@@ -212,6 +214,17 @@ export default {
};
},
methods: {
//格式化原始数据
formatFun(data) {
data.map(e => {
if (e.status == 0) {
e._disabled = false;
} else {
e._disabled = true;
}
});
return data;
},
onSelect(a, b) {
//批量选择
this.rootCategoryId = a[0].rootCategoryId;
......@@ -261,9 +274,9 @@ export default {
col.code = u.note;
}
if (u.dataType == 4) {
col.type = 'date';
col.type = "date";
}
if (u.unitName&&(u.dataType==1||u.dataType==2)) {
if (u.unitName && (u.dataType == 1 || u.dataType == 2)) {
var units = this.$store.getters.dictionaryByKey(
"material.main.unitName"
);
......@@ -279,7 +292,7 @@ export default {
this.cols = this.cols.concat(extra);
var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length - 1]);
if(delay){
if (delay) {
delay();
}
// console.log(this.cols)
......@@ -349,14 +362,14 @@ export default {
handler(newName, oldName) {
console.log("ovo", newName, oldName);
if (newName.rootCategoryId) {
this.initCols(()=>{
this.initCols(() => {
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
}
});
}
if (!newName.categoryId) {
if (!newName.categoryId) {
this.easySearch.categoryId.value = "-1";
}
},
......
......@@ -111,7 +111,8 @@ export default {
click: () => this.details(params.row.id)
}
},
params.row.code
// params.row.code
!params.row.code ? "未分配" : params.row.code
);
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment