Commit 54642881 authored by renjintao's avatar renjintao

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

parents 923ed367 73ee7462
......@@ -7,7 +7,7 @@
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入编码/名称/状态"
placeholder="请输入编码/名称"
v-width="200"
v-model="easySearch.keys.value"
clearable
......
import Api from '@/plugins/request'
export default {
index:`${systemUrl}/material/paged`,
lists:`${systemUrl}/category/list`,
paged(params){
return Api.post(`${systemUrl}/material/paged`,params);
},
......@@ -19,5 +20,7 @@ export default {
delete(id) {
return Api.delete(`${systemUrl}/material/delete`,{params:{id:id}});
},
categoryList(params){
return Api.post(`${systemUrl}/category/list`,params);
},
}
\ No newline at end of file
......@@ -16,18 +16,20 @@
</div>
</Sider>
<Content class="right-detail">
<div class="btn">
<Button type="primary">编辑</Button>
<div class="btn" v-show="showFrom">
<!-- <Button type="primary">编辑</Button> -->
<div class="new-detail">
<Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
<Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" name="状态:">
<State code="materail.category.status" :value="parseInt(entity.status)" />
</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述::">{{entity.description}}</Filed>
</Row>
<Divider />
<!-- <Divider />
<div class="title-h4">engineering</div>
<Row>
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课</Filed>
......@@ -46,37 +48,62 @@
<Filed :span="8" :name="l('routingHeaderName')+':'">HHJK就开始上课uioiweiwuuu你和环境</Filed>
<Filed :span="8" :name="l('routingDetailName')+':'">HHJK就开始上课</Filed>
<Filed :span="8" :name="l('standard')+':'">HHJK就开始上课</Filed>
</Row>
</Row>-->
</div>
</div>
<div v-show="showTable">
<!-- <DataGrid :columns="columns" ref="grid" :action="action" :high="false" :height="750"></DataGrid> -->
<Table border :columns="columns" :data="data1" :height="800"></Table>
</div>
</Content>
</Layout>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
data1: [],
action: Api.lists,
isactive: null,
showFrom: false,
showTable: false,
rowId: "",
entity: {},
easySearch: {
keys: { op: "title", value: "" },
table: { op: "Equal", value: "material" },
tId: {
op: "Equal",
value: this.$route.query.id
}
},
listData: [
{
lable: "属性"
},
{
lable: "图像"
},
{
lable: "图像"
},
lable: "历史记录"
}
],
columns: [
{
lable: "图像"
key: "name",
title: "名称",
align: "left"
},
{
lable: "图像"
key: "creationTime",
title: "名称",
align: "left"
}
]
};
},
created() {
this.rowId = this.$route.query.id;
},
methods: {
back() {
this.$router.push({
......@@ -85,6 +112,38 @@ export default {
},
everyItem(li, i) {
this.isactive = i;
if (li.lable == "属性") {
this.showFrom = true;
this.showTable = false;
Api.get({ id: this.rowId }).then(r => {
if (r.result) {
this.entity = r.result;
}
});
} else {
this.showFrom = false;
this.showTable = true;
this.easySearch = {
conditions: [
{
fieldName: "table",
fieldValue: "material",
conditionalType: "Equal"
},
{
fieldName: "tId",
fieldValue: this.rowId,
conditionalType: "Equal"
}
]
};
Api.categoryList(this.easySearch).then(r => {
if (r.result) {
this.data1 = r.result;
}
});
}
},
l(key) {
key = "routing_qc_card" + "." + key;
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
......
<template>
<div class="master-data">
<DataGrid
:columns="columns"
ref="grid"
......@@ -55,6 +54,7 @@ export default {
data() {
return {
action: Api.index,
modal: false,
title: "新增",
curId: 0,
......@@ -87,7 +87,7 @@ export default {
{
props: {},
on: {
click: () => this.details(params.row)
click: () => this.details(params.row.id)
}
},
params.row.code
......@@ -156,7 +156,8 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
this.$refs.grid.reload(this.easySearch);
// this.$refs.grid.reload(this.easySearch);
},
methods: {
search() {
......@@ -201,9 +202,13 @@ export default {
// }
// });
},
details() {
details(id) {
alert(id)
this.$router.push({
path: "/materiel/masterData/details"
path: "/materiel/masterData/details",
query: {
id: id
}
});
},
ok() {
......
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