Commit 2d639584 authored by kangzhenfei's avatar kangzhenfei

工艺案例

parent 260f5b82
......@@ -375,7 +375,7 @@ export default {
this.$emit("on-drag-drop", a, b);
},
easySearch() {
if (this.conditions && this.conditions.keys.default) {
if (this.conditions &&this.conditions.keys&& this.conditions.keys.default) {
//判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys;
}
......
<template>
<div class="pross_case">
<!-- table -->
<DataGrid :columns="columns" ref="grid" :action="action" type="card" :span="6" class="table_box">
<!-- table -->
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
type="card"
:span="6"
:high="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -19,22 +27,24 @@
<Button type="primary" @click="add">新增</Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="card_box" @click="changeCards(row)">
<Row :gutter="16">
<Col span="6">
<div class="file">
<Icon type="ios-paper" v-if="row.id%2==0"/>
<Icon type="md-film" v-else/>
</div>
</Col>
<Col span="18">
<p><b>{{row.title}}</b></p>
<p>{{row.creationTime}}</p>
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</div>
<!-- <Tag type="dot" slot-scope="{row}" :checkable="true" class="tag_card" size="large" :name="row.id" :key="row.index" :checked="row.checked"
<div class="card_box" @click="changeCards(row)">
<Row :gutter="16">
<Col span="6">
<div class="file">
<Icon type="ios-paper" v-if="row.id%2==0" />
<Icon type="md-film" v-else />
</div>
</Col>
<Col span="18">
<p>
<b>{{row.title}}</b>
</p>
<p>{{row.creationTime}}</p>
<p>{{row.id}}{{row.creator}}</p>
</Col>
</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" >
<Row :gutter="16">
<Col span="6">
......@@ -49,7 +59,7 @@
<p>{{row.id}}{{row.creator}}</p>
</Col>
</Row>
</Tag> -->
</Tag>-->
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
......@@ -66,7 +76,7 @@ export default {
Search
},
head: {
title: "工艺案例/工艺提醒",
title: "工艺案例",
author: "henq",
description: "process_case 6/1/2020 5:06:34 PM"
},
......@@ -74,7 +84,8 @@ export default {
return {
action: Api.index,
easySearch: {
keys: { op: "title", value: null }
keys: { op: "title", value: null },
type: { op: "Equal", value: 1 }
},
modal: false,
title: "新增",
......@@ -207,15 +218,34 @@ export default {
]
};
},
created() {
// this.treeHeight = window.innerHeight - 120;
// this.laodparme();
},
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 }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
changeCards(carData){
this.$Message.success("选择工艺")
laodparme() {
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() {
this.$refs.grid.load();
......
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show"><FormItem :label="$t('id')" prop="id"> <Input v-model="condition.id.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.creationTime.show"><FormItem :label="l('creationTime')" prop="creationTime"> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.creatorUserId.show"><FormItem :label="l('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.lastModificationTime.show"><FormItem :label="l('lastModificationTime')" prop="lastModificationTime"> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show"><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.deletionTime.show"><FormItem :label="l('deletionTime')" prop="deletionTime"> <DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</FormItem></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>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show">
<FormItem :label="$t('id')" prop="id">
<Input v-model="condition.id.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creationTime.show">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.creatorUserId.show">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModificationTime.show">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value"></Input>
</FormItem>
</Col>
<Col :span="12" :v-if="condition.deletionTime.show">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</FormItem>
</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>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
condition: {
id:{op:"Equal",value:null,show:true},
creationTime:{op:"Range",value:null,show:true},
creatorUserId:{op:"Equal",value:null,show:true},
lastModificationTime:{op:"Range",value:null,show:true},
lastModifierUserId:{op:"Equal",value:null,show:true},
deletionTime:{op:"Range",value:null,show:true},
title:{op:"Equal",value:null,show:true},
creator:{op:"Equal",value:null,show:true},
filePath:{op:"Equal",value:null,show:true},
filePaths:{op:"Equal",value:null,show:true},
dispatchId:{op:"Equal",value:null,show:true},
routingDetailId:{op:"Equal",value:null,show:true},
routingHeaderId:{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)
import Api from "./api";
export default {
name: "Add",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: true },
creationTime: { op: "Range", value: null, show: true },
creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: true },
title: { op: "Equal", value: null, show: true },
creator: { op: "Equal", value: null, show: true },
filePath: { op: "Equal", value: null, show: true },
filePaths: { op: "Equal", value: null, show: true },
dispatchId: { op: "Equal", value: null, show: true },
routingDetailId: { op: "Equal", value: null, show: true },
routingHeaderId: { 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);
}
}
};
</script>
\ No newline at end of file
......@@ -5,13 +5,21 @@
:columns="columns"
ref="grid"
:action="action"
:conditions="conditions"
:conditions="easySearch"
type="card"
:span="6"
:easy="false"
:height="false"
class="table_box"
:span="6"
:high="false"
>
<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">
<Button type="primary" @click="add">新增</Button>
</template>
......@@ -56,15 +64,9 @@ export default {
data() {
return {
action: Api.index,
conditions: {
pageIndex: 1,
pageSize: 20,
conditions: [
{ fieldName: "type", fieldValue: 2, conditionalType: "Equal" }
]
},
easySearch: {
keys: { op: "title", value: null }
keys: { op: "title", value: null },
type: { op: "Equal", value: 2 }
},
modal: false,
title: "新增",
......@@ -198,7 +200,7 @@ export default {
};
},
mounted() {
console.log(this);
// console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -252,6 +254,26 @@ export default {
this.modal = false;
},
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;
return this.$t(vkey) || key;
}
......
......@@ -99,8 +99,8 @@
}
.pross_case{
padding: 5px 50px 0;
.table_box{
height: calc(100vh - 105px);
height: calc(100vh - 105px);
// .table_box{
.card_box {
background: #F5F6FA;
border: 1px solid #dedede7d;
......@@ -116,7 +116,7 @@
.card_box:hover {
box-shadow: 4px 5px 7px #d2d2d2bd;
}
}
// }
}
}
......
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