Commit 74e52bec authored by 樊国敬's avatar 樊国敬

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

parents bb0fbf84 87cd0148
...@@ -375,7 +375,7 @@ export default { ...@@ -375,7 +375,7 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if (this.conditions && this.conditions.keys.default) { if (this.conditions &&this.conditions.keys&& this.conditions.keys.default) {
//判断没有传入条件的用默认的查询 //判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys; this.conditions.keys.value = this.keys;
} }
......
<template> <template>
<div class="pross_case"> <div class="pross_case">
<!-- table --> <!-- table -->
<DataGrid :columns="columns" ref="grid" :action="action" type="card" :span="6" class="table_box"> <DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
type="card"
:span="6"
:high="false"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -19,22 +27,24 @@ ...@@ -19,22 +27,24 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
<template slot="card" slot-scope="{row}"> <template slot="card" slot-scope="{row}">
<div class="card_box" @click="changeCards(row)"> <div class="card_box" @click="changeCards(row)">
<Row :gutter="16"> <Row :gutter="16">
<Col span="6"> <Col span="6">
<div class="file"> <div class="file">
<Icon type="ios-paper" v-if="row.id%2==0"/> <Icon type="ios-paper" v-if="row.id%2==0" />
<Icon type="md-film" v-else/> <Icon type="md-film" v-else />
</div> </div>
</Col> </Col>
<Col span="18"> <Col span="18">
<p><b>{{row.title}}</b></p> <p>
<p>{{row.creationTime}}</p> <b>{{row.title}}</b>
<p>{{row.id}}{{row.creator}}</p> </p>
</Col> <p>{{row.creationTime}}</p>
</Row> <p>{{row.id}}{{row.creator}}</p>
</div> </Col>
<!-- <Tag type="dot" slot-scope="{row}" :checkable="true" class="tag_card" size="large" :name="row.id" :key="row.index" :checked="row.checked" </Row>
</div>
<!-- <Tag type="dot" slot-scope="{row}" :checkable="true" class="tag_card" size="large" :name="row.id" :key="row.index" :checked="row.checked"
color="primary" @on-change="changeCards" > color="primary" @on-change="changeCards" >
<Row :gutter="16"> <Row :gutter="16">
<Col span="6"> <Col span="6">
...@@ -49,7 +59,7 @@ ...@@ -49,7 +59,7 @@
<p>{{row.id}}{{row.creator}}</p> <p>{{row.id}}{{row.creator}}</p>
</Col> </Col>
</Row> </Row>
</Tag> --> </Tag>-->
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
...@@ -66,7 +76,7 @@ export default { ...@@ -66,7 +76,7 @@ export default {
Search Search
}, },
head: { head: {
title: "工艺案例/工艺提醒", title: "工艺案例",
author: "henq", author: "henq",
description: "process_case 6/1/2020 5:06:34 PM" description: "process_case 6/1/2020 5:06:34 PM"
}, },
...@@ -74,7 +84,8 @@ export default { ...@@ -74,7 +84,8 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: "title", value: null } keys: { op: "title", value: null },
type: { op: "Equal", value: 1 }
}, },
modal: false, modal: false,
title: "新增", title: "新增",
...@@ -207,15 +218,34 @@ export default { ...@@ -207,15 +218,34 @@ export default {
] ]
}; };
}, },
created() {
// this.treeHeight = window.innerHeight - 120;
// this.laodparme();
},
mounted() { mounted() {
console.log(this); // console.log(this);
// debugger
// alert(23344)
// let where = { type: { op: "Equal", value: 1 } };
// this.$refs.grid.reload(where);
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
changeCards(carData){ laodparme() {
this.$Message.success("选择工艺") console.log(555);
let condition = {
pageIndex: 1,
pageSize: 10,
conditions: {
type: { op: "Equal", value: 1 }
}
};
this.$refs.grid.reload(condition);
},
changeCards(carData) {
this.$Message.success("选择工艺");
}, },
ok() { ok() {
this.$refs.grid.load(); this.$refs.grid.load();
......
<template> <template>
<Form ref="form" :model="condition" :label-width="90"> <Form ref="form" :model="condition" :label-width="90">
<Row> <Row>
<Col :span="12" :v-if="condition.id.show"><FormItem :label="$t('id')" prop="id"> <Input v-model="condition.id.value"> </Input> <Col :span="12" :v-if="condition.id.show">
</FormItem></Col> <FormItem :label="$t('id')" prop="id">
<Col :span="12" :v-if="condition.creationTime.show"><FormItem :label="l('creationTime')" prop="creationTime"> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker> <Input v-model="condition.id.value"></Input>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.creatorUserId.show"><FormItem :label="l('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" :v-if="condition.creationTime.show">
<Col :span="12" :v-if="condition.lastModificationTime.show"><FormItem :label="l('lastModificationTime')" prop="lastModificationTime"> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker> <FormItem :label="l('creationTime')" prop="creationTime">
</FormItem></Col> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
<Col :span="12" :v-if="condition.lastModifierUserId.show"><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.deletionTime.show"><FormItem :label="l('deletionTime')" prop="deletionTime"> <DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker> <Col :span="12" :v-if="condition.creatorUserId.show">
</FormItem></Col> <FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Col :span="12" :v-if="condition.title.show"><FormItem :label="l('title')" prop="title"> <Input v-model="condition.title.value"> </Input> <Input v-model="condition.creatorUserId.value"></Input>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.creator.show"><FormItem :label="l('creator')" prop="creator"> <Input v-model="condition.creator.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" :v-if="condition.lastModificationTime.show">
<Col :span="12" :v-if="condition.filePath.show"><FormItem :label="l('filePath')" prop="filePath"> <Input v-model="condition.filePath.value"> </Input> <FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
</FormItem></Col> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
<Col :span="12" :v-if="condition.filePaths.show"><FormItem :label="l('filePaths')" prop="filePaths"> <Input v-model="condition.filePaths.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.dispatchId.show"><FormItem :label="l('dispatchId')" prop="dispatchId"> <Input v-model="condition.dispatchId.value"> </Input> <Col :span="12" :v-if="condition.lastModifierUserId.show">
</FormItem></Col> <FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Col :span="12" :v-if="condition.routingDetailId.show"><FormItem :label="l('routingDetailId')" prop="routingDetailId"> <Input v-model="condition.routingDetailId.value"> </Input> <Input v-model="condition.lastModifierUserId.value"></Input>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.routingHeaderId.show"><FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <Input v-model="condition.routingHeaderId.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" :v-if="condition.deletionTime.show">
<Col :span="12" :v-if="condition.type.show"><FormItem :label="l('type')" prop="type"> <Input v-model="condition.type.value"> </Input> <FormItem :label="l('deletionTime')" prop="deletionTime">
</FormItem></Col> <DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</Row> </FormItem>
</Form> </Col>
<Col :span="12" :v-if="condition.title.show">
<FormItem :label="l('title')" prop="title">
<Input v-model="condition.title.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creator.show">
<FormItem :label="l('creator')" prop="creator">
<Input v-model="condition.creator.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.filePath.show">
<FormItem :label="l('filePath')" prop="filePath">
<Input v-model="condition.filePath.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.filePaths.show">
<FormItem :label="l('filePaths')" prop="filePaths">
<Input v-model="condition.filePaths.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.dispatchId.show">
<FormItem :label="l('dispatchId')" prop="dispatchId">
<Input v-model="condition.dispatchId.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.routingHeaderId.show">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<Input v-model="condition.routingHeaderId.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.type.show">
<FormItem :label="l('type')" prop="type">
<Input v-model="condition.type.value"></Input>
</FormItem>
</Col>
</Row>
</Form>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
condition: { condition: {
id:{op:"Equal",value:null,show:true}, id: { op: "Equal", value: null, show: true },
creationTime:{op:"Range",value:null,show:true}, creationTime: { op: "Range", value: null, show: true },
creatorUserId:{op:"Equal",value:null,show:true}, creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime:{op:"Range",value:null,show:true}, lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId:{op:"Equal",value:null,show:true}, lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime:{op:"Range",value:null,show:true}, deletionTime: { op: "Range", value: null, show: true },
title:{op:"Equal",value:null,show:true}, title: { op: "Equal", value: null, show: true },
creator:{op:"Equal",value:null,show:true}, creator: { op: "Equal", value: null, show: true },
filePath:{op:"Equal",value:null,show:true}, filePath: { op: "Equal", value: null, show: true },
filePaths:{op:"Equal",value:null,show:true}, filePaths: { op: "Equal", value: null, show: true },
dispatchId:{op:"Equal",value:null,show:true}, dispatchId: { op: "Equal", value: null, show: true },
routingDetailId:{op:"Equal",value:null,show:true}, routingDetailId: { op: "Equal", value: null, show: true },
routingHeaderId:{op:"Equal",value:null,show:true}, routingHeaderId: { op: "Equal", value: null, show: true },
type:{op:"Equal",value:null,show:true}, type: { op: "Equal", value: null, show: true }
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "process_case" + "." + key;
return this.$t(key)
} }
} };
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "process_case" + "." + key;
return this.$t(key);
} }
}
};
</script> </script>
\ No newline at end of file
<template>
<div class="">
<div class="case_box">
<!-- <a class="file_card div_card" @click="ditaile(item.name)"
v-for="(item,index) in cardlist" :label="item.id" :key="index">
<div class="file">
<Icon type="ios-paper" v-if="item.id%3==0"/> -->
<!-- <Icon type="ios-film" v-else/> -->
<!-- <Icon type="md-film" v-else/>
</div>
<div class="list">
<ul>
<li>{{item.name}}</li>
<li>{{item.userName}}</li>
<li>{{item.time}}</li>
</ul>
</div>
</a> -->
工艺提醒列表
<DataGrid
:columns="columns"
ref="grid" style="height:auto"
type="card"
:high="false"
:span="6"
:lazy="true"
>
<!-- <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
search
enter-button
placeholder="请输入关键字项目名称"
v-model="easySearch.keys.value"
@on-search="search"
/>
</FormItem>
</Form>
</template> -->
<template slot="buttons">
<Button type="primary">新增</Button>
</template>
<!--<template slot="card" slot-scope="{row}">
<!-- v-for="(item,index) in cardlist" :label="item.id" :key="index"
<div class="body">
<Row class="title-i">
<Col :span="18" class="order-code">项目名称:{{row.name}}</Col>
<Col :span="6" class="btn-click">
<a @click="edit(row.id)">
<Icon type="ios-create" @click="edit(row.id)" />
</a>
<a @click="detail(row.id)">
<Icon type="ios-paper" />
</a>
<a @click="remove(row.id)">
<Icon type="ios-trash" />
</a>
</Col>
</Row>
<div class="down-text">
<Row class="row">
<Col span="12" class="fa">主管部门:{{row.shopId}}</Col>
<Col span="12" class="fa">负责人:{{row.principal}}</Col>
</Row>
<Row class="row">
<Col span="12" class="fa">
销售阶段:
<state code="crm.project.stage" :value="row.stage" />
</Col>
<Col span="12" class="fa">
是否报备:
<state code="crm.project.isInform" :value="row.isInform" />
</Col>
</Row>
<Row class="row">
<Col span="12" class="fa">
状态:
<state code="crm.project.status" :value="row.status" />
</Col>
<Col span="12" class="fa">预算:{{row.budget}}</Col>
</Row>
</div>
</div>
</template> -->
</DataGrid>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
name:'starOrder',
data(){
return{
action: Api.index,
easySearch: {
keys: { op: "name", value: null },
customerId: { op: "Equal", value: null }
},
columns: [],
cardlist:[
{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:1,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:2,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:3,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:4,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:5,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:6,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:7,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:8,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:9,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:10,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:11,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:12,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:13,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:14,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:15,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:16,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:17,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:18,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:19,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:20,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:21,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:22,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:23,
checked:false
},
],
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
methods: {
ditaile(name){
this.$Message.success("查看: "+ name +" 详情...")
},
search() {
this.$refs.grid.reload(this.easySearch);
},
},
}
</script>
<template> <template>
<div class="pross_case"> <div class="pross_case pros_check">
<!-- table --> <!-- table -->
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
:action="action" :action="action"
:conditions="conditions" :conditions="easySearch"
type="card" type="card"
:span="6" :span="6"
:easy="false" :high="false"
:height="false"
class="table_box"
> >
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字名称" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
...@@ -56,15 +64,9 @@ export default { ...@@ -56,15 +64,9 @@ export default {
data() { data() {
return { return {
action: Api.index, action: Api.index,
conditions: {
pageIndex: 1,
pageSize: 20,
conditions: [
{ fieldName: "type", fieldValue: 2, conditionalType: "Equal" }
]
},
easySearch: { easySearch: {
keys: { op: "title", value: null } keys: { op: "title", value: null },
type: { op: "Equal", value: 2 }
}, },
modal: false, modal: false,
title: "新增", title: "新增",
...@@ -198,7 +200,7 @@ export default { ...@@ -198,7 +200,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(this); // console.log(this);
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
...@@ -252,6 +254,26 @@ export default { ...@@ -252,6 +254,26 @@ export default {
this.modal = false; this.modal = false;
}, },
l(key) { l(key) {
/*
process_case:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'名称',
creator:'创建人',
content:'内容',
filePath:'文件路径',
filePaths:'多个文件路径',
dispatchId:'工单id',
routingDetailId:'工序id',
routingHeaderId:'工艺规程id',
type:'类型(工艺案例还是工艺提醒)',
}
*/
let vkey = "process_case" + "." + key; let vkey = "process_case" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</Header> </Header>
<Layout class="bottom_box"> <Layout class="bottom_box">
<!-- <nuxt-child keep-alive></nuxt-child> --> <!-- <nuxt-child keep-alive></nuxt-child> -->
<component :is="detail" :eid="id" :uid="uId" :isoutpdf="false" style="padding:10px 30px;" /> <component :is="detail" :eid="id" :uid="uId" :isoutpdf="false"/>
</Layout> </Layout>
</Layout> </Layout>
</div> </div>
...@@ -70,18 +70,18 @@ export default { ...@@ -70,18 +70,18 @@ export default {
this.detail = () => import("./components/workSteps"); this.detail = () => import("./components/workSteps");
} }
if (this.id == "4") { if (this.id == "4") {
this.detail = () => import("./components/guidance"); this.detail = () => import("./guidance");
} }
} }
} }
}; };
</script> </script>
<style scoped> <style scoped>
.wu_bg .bottom_box { /* .wu_bg .bottom_box {
padding: 5px 20px; padding: 5px 20px;
background: white; background: white;
border: 1px solid #ccc; border: 1px solid #ccc;
border-top: 0; border-top: 0;
overflow-y: auto; overflow-y: auto;
} } */
</style> </style>
...@@ -97,10 +97,14 @@ ...@@ -97,10 +97,14 @@
margin: 10px 0 0 170px; margin: 10px 0 0 170px;
} }
} }
.bottom_box{
height: calc(100vh - 145px);
overflow-y: auto;
padding: 15px 40px 0px;
}
.pross_case{ .pross_case{
padding: 5px 50px 0; padding: 5px 50px 0;
.table_box{ height: calc(100vh - 105px);
height: calc(100vh - 105px);
.card_box { .card_box {
background: #F5F6FA; background: #F5F6FA;
border: 1px solid #dedede7d; border: 1px solid #dedede7d;
...@@ -116,7 +120,10 @@ ...@@ -116,7 +120,10 @@
.card_box:hover { .card_box:hover {
box-shadow: 4px 5px 7px #d2d2d2bd; box-shadow: 4px 5px 7px #d2d2d2bd;
} }
} }
.pros_check{
height: calc(100vh - 175px);
padding: 0;
} }
} }
......
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