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