Commit 687df1cc authored by 仇晓婷's avatar 仇晓婷

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

parents d11aeedd 1b457162
...@@ -143,8 +143,10 @@ ...@@ -143,8 +143,10 @@
</template> </template>
<script> <script>
import ColumnSlot from "./treeGrid/columnSolt";
export default { export default {
name: "DataGrid", name: "DataGrid",
components: { ColumnSlot },
data() { data() {
return { return {
keys: "", keys: "",
...@@ -155,7 +157,7 @@ export default { ...@@ -155,7 +157,7 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
sortBy: "id", sortBy: "id",
isDesc:true, isDesc: true,
conditions: [], conditions: [],
}, },
searchConditions: this.search, searchConditions: this.search,
...@@ -294,15 +296,16 @@ export default { ...@@ -294,15 +296,16 @@ export default {
default: "", default: "",
}, },
}, },
provide() {
return {
tableRoot: this.slots,
};
},
created() { created() {
this.columns.forEach((u) => {
if (!u.hide) {
u.hide = false;
}
});
this.columnsCur = this.$u.clone(this.columns);
}, },
mounted() { mounted() {
this.initColumns();
if (this.data && this.data.length > 0) { if (this.data && this.data.length > 0) {
this.list = this.data; this.list = this.data;
return; return;
...@@ -350,7 +353,41 @@ export default { ...@@ -350,7 +353,41 @@ export default {
this.getRoutingHeaderData(); this.getRoutingHeaderData();
this.getAllUser(); //获取所有用户 this.getAllUser(); //获取所有用户
}, },
methods: { methods: {
//列初始化 slot 支持;
slots() {
return this.$scopedSlots;
},
initColumns() {
this.columns.forEach((u) => {
if (!u.hide) {
u.hide = false;
}
});
var items=this.$u.clone(this.columns);
var soct=this.$scopedSlots;
console.warn("that.$scopedSlots()",soct["action"]());
items.forEach((u) => {
if (u.slot) {
u.render = (h, params) => {
return h(
"span",
// soct[u.slot]({
// row: params.row,
// column: params.column,
// index: params.index,
// })
params.row.id
);
};
delete u.slot;
}
});
this.columnsCur = items;
console.log("cur", items,this.columnsCur);
},
//数据加载 //数据加载
load() { load() {
if (this.action) { if (this.action) {
......
export default {
name: 'ColumnSlot',
functional: true,
inject: ['tableRoot'],
props: {
row: Object,
index: Number,
column: {
type: Object,
default: null
}
},
render: (h, ctx) => {
return h('span', ctx.injections.tableRoot()[ctx.props.column.slot]({
row: ctx.props.row,
column: ctx.props.column,
index: ctx.props.index
}));
}
};
\ No newline at end of file
This diff is collapsed.
export default {
name: 'TableSlot',
functional: true,
inject: ['tableRoot'],
props: {
row: Object,
index: Number,
column: {
type: Object,
default: null
}
},
render: (h, ctx) => {
return h('div', ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot]({
row: ctx.props.row,
column: ctx.props.column,
index: ctx.props.index
}));
}
};
\ No newline at end of file
...@@ -157,8 +157,8 @@ export default { ...@@ -157,8 +157,8 @@ export default {
this.resources = this.$u.clone(r.result); this.resources = this.$u.clone(r.result);
//alert(JSON.stringify(this.resources)) //alert(JSON.stringify(this.resources))
this.entity = v; this.entity = v;
this.entity.resourceCode = v.firsT_EQUIP_CODE; this.entity.resourceCode = v.first_equip;
let code = v.firsT_EQUIP_CODE; let code = v.first_equip;
this.entity.resource = [] this.entity.resource = []
//let code = 'PCZYBZBH_20200804_1' //let code = 'PCZYBZBH_20200804_1'
if (code && code != '') { if (code && code != '') {
......
...@@ -144,9 +144,9 @@ export default { ...@@ -144,9 +144,9 @@ export default {
key: "firsT_EQUIP_CODE", key: "firsT_EQUIP_CODE",
title: this.l("first_equip"), title: this.l("first_equip"),
align: "left", align: "left",
render: (h, params) => { //test:PCZYBZBH_20200804_1 params.row.firsT_EQUIP_CODE // render: (h, params) => { //test:PCZYBZBH_20200804_1 params.row.firsT_EQUIP_CODE
return h("span", {}, this.getResourceName(params.row.firsT_EQUIP_CODE)) // return h("span", {}, this.getResourceName(params.row.firsT_EQUIP_CODE))
} // }
}, },
{ {
key: "setup_time", key: "setup_time",
......
This diff is collapsed.
This diff is collapsed.
...@@ -266,6 +266,14 @@ export default { ...@@ -266,6 +266,14 @@ export default {
high: true, high: true,
hide: true, hide: true,
}, },
{
key: "isPreschedule",
title: this.l("isPreschedule"),
align: "center",
width: 100,
high: true,
code: "aps.plan.ispreschedule",
},
{ {
key: "demandStart", key: "demandStart",
title: this.l("demandStart"), title: this.l("demandStart"),
......
This diff is collapsed.
<template> <template>
<div class=""> <div class="orderDetail">
<Form :label-width="190" inline> <Row>
<Row> <Col span="8">
<Col span="12"> <span class="fwBold">{{l('mesCode')}}</span>
<FormItem label="订单编号:" style="width:100%"> <p>{{baseData.mesCode}}</p>
<h3>{{baseData.mesCode}}</h3> </Col>
</FormItem> <Col span="8">
</Col> <span class="fwBold">{{l('taskType')}}</span>
<Col span="12" class=""> <p>
<FormItem label="产品名称:" style="width:100%"> <state code="plan.order.taskType" :value="baseData.taskType" type="text"></state>
<h4>{{baseData.productName}}</h4> </p>
</FormItem> </Col>
</Col> <Col span="8">
<Col span="12" class=""> <span class="fwBold">{{l('quantity')}}</span>
<FormItem label="产品图号:" style="width:100%"> <p>{{baseData.quantity}}</p>
<h4>{{baseData.drawnNumber}}</h4> </Col>
</FormItem> </Row>
</Col> <Row>
<Col span="12" class=""> <Col span="8">
<FormItem label="任务类型:" style="width:100%"> <span class="fwBold">{{l('status')}}</span>
<state code="plan.order.taskType" :value="baseData.taskType+''" type="text"></state> <p>
</FormItem> <state code="plan.order.status" :value="baseData.status" type="text"></state>
</Col> </p>
<Col span="8" class=""> </Col>
<FormItem label="阶段:" style="width:100%"> <Col span="8">
<state code="plan.order.stage" :value="baseData.stage+''" type="text"></state> <span class="fwBold">{{l('productName')}}</span>
</FormItem> <p>{{baseData.productName}}</p>
</Col> </Col>
<Col span="8" class=""> <Col span="8">
<FormItem label="材料:" style="width:100%"> <span class="fwBold">{{l('drawnNumber')}}</span>
<state code="plan.order.material" :value="baseData.materialId+''" type="text"></state> <p>{{baseData.drawnNumber}}</p>
</FormItem> </Col>
</Col> </Row>
<Col span="8" class=""> <Row>
<FormItem label="数量:" style="width:100%"> <Col span="8">
<span>{{baseData.quantity}}</span> <span class="fwBold">{{l('batchNumber')}}</span>
</FormItem> <p>{{baseData.batchNumber}}</p>
</Col> </Col>
<Col span="8" class=""> <Col span="8">
<FormItem label="工艺方法:" style="width:100%"> <span class="fwBold">{{l('projectNumber')}}</span>
<state code="plan.order.routingMethod" :value="baseData.routing_Method+''" type="text"></state> <p>{{baseData.projectNumber}}</p>
</FormItem> </Col>
</Col> <Col span="8">
<Col span="8" class=""> <span class="fwBold">{{l('urgencyLevel')}}</span>
<FormItem label="甲方客户:" style="width:100%"> <p>
<state code="plan.order.guestName" :value="baseData.guestName+''" type="text"></state> <state code="plan.order.urgencyLevel" :value="baseData.urgencyLevel" type="text"></state>
</FormItem> </p>
</Col> </Col>
<Col span="8" class=""> </Row>
<FormItem label="外包络尺寸(mm):" style="width:100%"> <Row>
<span>{{baseData.outer_Envelope_Size}}</span> <Col span="8">
</FormItem> <span class="fwBold">{{l('demandStartDate')}}</span>
</Col> <p>
<Col span="12" class=""> <DTSpan type="date" v-model="baseData.demandStartDate"></DTSpan>
<FormItem label="开始时间:" style="width:100%"> </p>
<span>{{baseData.demandStartDate}}</span> </Col>
</FormItem> <Col span="8">
</Col> <span class="fwBold">{{l('demandFinishDate')}}</span>
<Col span="12" class=""> <p>
<FormItem label="完成时间:" style="width:100%"> <DTSpan type="date" v-model="baseData.demandFinishDate"></DTSpan>
<span>{{baseData.demandFinishDate}}</span> </p>
</FormItem> </Col>
</Col> <Col span="8">
<Col span="12" class=""> <span class="fwBold">{{l('taskRequire')}}</span>
<FormItem label="任务节点要求:" style="width:100%"> <p>{{baseData.taskRequire}}</p>
<span>{{baseData.taskRequire}}</span> </Col>
</FormItem> </Row>
</Col> <Row class="lastRow">
<Col span="12" class=""> <Col span="24">
<FormItem label="厂内责任机关:" style="width:100%"> <span class="fwBold">{{l('remark')}}</span>
<span>{{baseData.functionaryOffice}}</span> <p>{{baseData.remark}}</p>
</FormItem> </Col>
</Col> </Row>
<Col span="12" class="">
<FormItem label="厂内责任主体部门:" style="width:100%"> </div>
<state code="plan.order.mainDepartment" :value="baseData.mainDepartmentId+''" type="text"></state>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="3D打印承制单位:" style="width:100%">
<state code="plan.order.printSupply" :value="baseData.printSupply+''" type="text"></state>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="甲方投产输入文件(编号):" style="width:100%">
<span>{{baseData.putintDocmentCode}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="甲方技术输入文件(编号):" style="width:100%">
<span>{{baseData.technologyDocmentCode}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="外部图号/模型号:" style="width:100%">
<span>{{baseData.outerDrawnNumber}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="模型版本:" style="width:100%">
<span>{{baseData.modelVersion}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="甲方任务号:" style="width:100%">
<span>{{baseData.taskCode}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="甲方设计人员:" style="width:100%">
<span>{{baseData.designer}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="厂内机关负责人:" style="width:100%">
<span>{{baseData.officeFunctionary}}</span>
</FormItem>
</Col>
<Col span="12" class="">
<FormItem label="厂内主工艺人员:" style="width:100%">
<span>{{baseData.mainRoutingPeople}}</span>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template> </template>
<script> <script>
export default { export default {
props: ['baseData'], props: ['baseData'],
data() { data() {
return { return {
themeBg:'light', themeBg: 'light',
basicData:{}, basicData: {},
} }
}, },
methods: { methods: {
l(key) {
key = "mes_plan" + "." + key;
return this.$t(key);
}
}, },
} }
</script> </script>
<style scoped>
</style> <style lang="less">
\ No newline at end of file .orderDetail {
line-height: 30px;
width: 90%;
margin: 0 auto;
.ivu-row {
padding-top: 20px;
padding-bottom: 20px;
border-bottom: #ccc solid 1px;
}
.lastRow {
border-bottom: none;
}
}
</style>
This diff is collapsed.
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<template> <template>
<div class="flex fd test_layout"> <div class="flex fd test_layout">
<div> <div>
<Menu mode="horizontal" theme="light" active-name="0"> <Menu mode="horizontal" theme="light" active-name="a0">
<div class="layout-assistant"> <div class="layout-assistant">
<MenuItem name="0" to="/test/example">基础组件</MenuItem> <MenuItem name="a0" to="/test/example">基础组件</MenuItem>
<MenuItem name="1" to="/test/user">人员选择</MenuItem> <MenuItem name="a1" to="/test/user">人员选择</MenuItem>
<MenuItem name="2" to="/test/com">异步组件</MenuItem> <MenuItem name="a2" to="/test/com">异步组件</MenuItem>
<MenuItem name="4" to="/test/resource">资源选择</MenuItem> <MenuItem name="a4" to="/test/resource">资源选择</MenuItem>
<MenuItem name="3" to="/test/view">详情拖拽排版</MenuItem> <MenuItem name="a3" to="/test/view">详情拖拽排版</MenuItem>
</div> </div>
</Menu> </Menu>
</div> </div>
......
...@@ -13,10 +13,16 @@ export const exampleRouter = [ ...@@ -13,10 +13,16 @@ export const exampleRouter = [
}, },
{ {
route: '/test/example/table', route: '/test/example/table',
title: 'treeGrid组件', title: '表格',
name: 'components-table', name: 'components-table',
icon: 'md-aperture' icon: 'md-aperture'
}, },
{
route: '/test/example/tree',
title: '树',
name: 'tree',
icon: 'md-aperture'
},
{ {
route: '/test/example/select', route: '/test/example/select',
title: 'select组件', title: 'select组件',
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
</FormItem> </FormItem>
</Form> </Form>
</template> </template>
<template slot-scope="{row,column,index}" slot="action">
<strong>aaaa</strong>
</template>
</DataGrid> </DataGrid>
</div> </div>
</template> </template>
...@@ -62,6 +65,7 @@ export default { ...@@ -62,6 +65,7 @@ export default {
easy: true, easy: true,
sortable:true, sortable:true,
high: true, high: true,
slot:"cardNo",
tooltip: true, tooltip: true,
}, },
], ],
......
<template>
<div class="tree">
<TreeGrid :columns="columns" :items="treeData">
<template slot-scope="{row,column,index}" slot="name">
<Icon type="md-folder" /> {{row.name}}
</template>
<template slot-scope="{row,column,index}" slot="action">
<strong>{{row.action}}</strong>
</template>
</TreeGrid>
<!-- <Input v-model="data" type="textarea" rows="20" placeholder=""></Input> -->
</div>
</template>
<script>
import Mock from "mockjs";
export default {
name: "",
data() {
return {
columns: [
{
type: "selection",
width:50,
align:"center"
},
{
key: "name",
title: "名称",
tree:true,
slot:"name"
},
{
key: "status",
title: "状态",
width: "100"
},
{
key: "action",
title: "操作",
width: "100",
sortable:true,
slot:"action"
},
],
treeData1: [],
treeData: [
{
action: "510000202006085435",
name: "书加部保处",
status: 0,
children: [
{ action: "430000200008054924", name: "越组大过越", status: 0 },
{ action: "350000200106195747", name: "反走和报山", status: 1 },
{ action: "46000019920810827X", name: "强级法量少务持", status: 1 },
{ action: "620000198005286979", name: "况题米", status: 1 },
{ action: "440000200901093872", name: "又多为", status: 0 },
],
},
{ action: "510000199304272074", name: "参什叫", status: 1 },
{ action: "710000199110144186", name: "情克应个该农", status: 1 },
{ action: "140000201204175550", name: "阶研其交式", status: 1 },
{ action: "500000198710051748", name: "议开你集", status: 1 },
],
data: "",
};
},
mounted() {
// this.init();
},
methods: {
init() {
var data = Mock.mock({
"data|5": [
{
action: "@id",
name: "@ctitle",
"status|1": [0, 1],
},
],
});
console.warn(data);
this.data = JSON.stringify(data.data);
this.treeData = data.data;
},
},
};
</script>
<style lang="less" >
</style>
\ No newline at end of file
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