Commit cd8c728c authored by 仇晓婷's avatar 仇晓婷

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

parents a4bd4a28 455988b4
<template> <template>
<TreeSelect v-model="dep" :data="data" @on-change="change" :disabled="disabled" :multiple="multiple" :transfer="true"/> <TreeSelect
v-model="dep"
:data="data"
@on-change="change"
:disabled="disabled"
:multiple="multiple"
clearable
:transfer="true"
/>
</template> </template>
<script> <script>
export default { export default {
model: { model: {
prop: 'value', prop: "value",
event: 'on-change' event: "on-change"
}, },
data() { data() {
return { return {
dep: '', dep: "",
data: [], data: [],
list:[] list: []
} };
}, },
created() { created() {
this.dep=this.value|''; this.dep = this.value | "";
this.$api.get(`${systemUrl}/Department/GetDepartments`).then((r) => { this.$api.get(`${systemUrl}/Department/GetDepartments`).then(r => {
this.list=r.result.items; var items = r.result.items;
var data=this.$u.toTree(r.result.items,0,u=>{
u.title=u.name; this.list = r.result.items;
u.value=u.id; if (this.type == -1) {
u.expand=true; var data = this.$u.toTree(
u.selected=false; r.result.items,
u.checked=false; 0,
},"parent_Id") u => {
this.data = this.$u.clone(data) ; u.title = u.name;
}) u.value = u.id;
u.expand = true;
u.selected = false;
u.checked = false;
},
"parent_Id"
);
this.data = this.$u.clone(data);
} else {
var result = [];
items.map(u => {
if (u["property"]) {
var ps = u["property"].split(",");
if (ps.length > 0 && ps.indexOf(this.type+'') > -1) {
result.push(u);
}
}
});
this.data = result.map(u => {
return {
title: u.name,
value: u.id
};
});
}
});
}, },
props: { props: {
value: [String, Number, Array], value: [String, Number, Array],
placeholder: { placeholder: {
type: String, type: String,
default: '请选择部门' default: "请选择部门"
}, },
multiple: { multiple: {
type: Boolean, type: Boolean,
default: false default: false
}, },
type: {
type: Number,
default: -1
/*
默认返回所有部门
1 返回所有生产班组
2 返回排产资源
3 返回所有车间
*/
},
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false
}, }
}, },
methods: { methods: {
change(v){ change(v) {
console.log(v) // console.log(v);
this.dep=v; this.dep = v;
var item; var item;
var items=this.list.filter(u=>{ var items = this.list.filter(u => {
return u.id==v return u.id == v;
}) });
if(items&&items.length>0){ if (items && items.length > 0) {
item=items[0]; item = items[0];
} }
this.$emit("on-change",v,item) this.$emit("on-change", v, item);
}, }
}, },
watch: { watch: {
value: { value: {
handler(v, o) { handler(v, o) {
this.dep = v|'' this.dep = v | "";
}, },
deep: true deep: true
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -178,10 +178,8 @@ ...@@ -178,10 +178,8 @@
<Col span="8" class="dispatch_card02" v-for="(item,index) in listMan" :key="index"> <Col span="8" class="dispatch_card02" v-for="(item,index) in listMan" :key="index">
<CheckboxGroup class="man_body"> <CheckboxGroup class="man_body">
<Checkbox v-model="item.checked" border class="checkUser"> <Checkbox v-model="item.checked" border class="checkUser">
<!-- <Tooltip :content="item.userName" placement="top-start"> -->
<span class="svg_name" :title="item.userName">{{item.userName}}</span> <span class="svg_name" :title="item.userName">{{item.userName}}</span>
<!-- <span class="svg">{{item.id}}</span> --> <!-- <span class="svg">{{item.id}}</span> -->
<!-- </Tooltip> -->
</Checkbox> </Checkbox>
</CheckboxGroup> </CheckboxGroup>
</Col> </Col>
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline style="margin-top:5px;"> <Form ref="formInline" :model="easySearch" inline style="margin-top:5px;">
<FormItem prop="productingpreparationpeople" style="width:200px"> <FormItem prop="productingpreparationpeople" style="width:200px">
<!-- <departmentSelect v-model="easySearch.productingpreparationpeople.value"></departmentSelect>--> <departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect>
<workShop v-model="easySearch.productingpreparationpeople.value"></workShop>
</FormItem> </FormItem>
<FormItem prop="keys"> <FormItem prop="keys">
<Input placeholder="请输入订单编号" v-model="easySearch.keys.value" /> <Input placeholder="请输入订单编号" v-model="easySearch.keys.value" />
......
...@@ -5,13 +5,10 @@ ...@@ -5,13 +5,10 @@
<div class="sear_btn"> <div class="sear_btn">
<Input search class="search_box mr10" enter-button placeholder="请输入文件名" /> <Input search class="search_box mr10" enter-button placeholder="请输入文件名" />
<a @click="allChecked" ><Icon type="md-checkbox-outline" />全选</a> <a @click="allChecked" ><Icon type="md-checkbox-outline" />全选</a>
<a @click="copyCard" ><Icon type="ios-browsers-outline" />复制</a> <!-- <a @click="copyCard" ><Icon type="ios-browsers-outline" />复制</a> -->
<a @click="deliteCard" ><Icon type="ios-trash-outline" />删除</a>
<a @click="importCard" ><Icon type="ios-log-in" />导入</a> <a @click="importCard" ><Icon type="ios-log-in" />导入</a>
<a @click="exportCard" ><Icon type="ios-log-out" />导出</a>
<a @click="addCard" ><Icon type="ios-add-circle-outline" />新建</a> <a @click="addCard" ><Icon type="ios-add-circle-outline" />新建</a>
<span>{{cardlist.length}} 个案例;</span> <span>{{cardlist.length}} 个案例;</span>
<span>已选择 {{checkCards}} 个案例</span>
</div> </div>
<a class="slip fr" @click="starFun" ><Icon type="md-swap" /></a> <a class="slip fr" @click="starFun" ><Icon type="md-swap" /></a>
</div> </div>
...@@ -38,7 +35,8 @@ ...@@ -38,7 +35,8 @@
v-for="(item,index) in cardlist" :label="item.id" :key="index"> v-for="(item,index) in cardlist" :label="item.id" :key="index">
<div class="file"> <div class="file">
<Icon type="ios-paper" v-if="item.id%3==0"/> <Icon type="ios-paper" v-if="item.id%3==0"/>
<Icon type="ios-film" v-else/> <!-- <Icon type="ios-film" v-else/> -->
<Icon type="md-film" v-else/>
</div> </div>
<div class="list"> <div class="list">
<ul> <ul>
...@@ -49,8 +47,13 @@ ...@@ -49,8 +47,13 @@
</div> </div>
</Checkbox> </Checkbox>
</CheckboxGroup> </CheckboxGroup>
</div> </div>
<FooterToolbar style="height:65px" v-show="checkCards!=0">
<span>已选择 {{checkCards}} 个案例</span>
<Button class="span ml20" type="primary" @click="deliteCard"><Icon type="ios-trash-outline" />删除</Button>
<Button class="span ml20" type="primary" @click="exportCard"><Icon type="ios-log-out" />导出</Button>
<Button @click="cancel">取消</Button>
</FooterToolbar>
</div> </div>
</template> </template>
<script> <script>
...@@ -60,6 +63,7 @@ export default { ...@@ -60,6 +63,7 @@ export default {
return{ return{
caseLise:[], caseLise:[],
checkCards:0, checkCards:0,
footerToolbar:false,
cardlist:[ cardlist:[
{ {
name:'工艺文档名称', name:'工艺文档名称',
...@@ -252,12 +256,15 @@ export default { ...@@ -252,12 +256,15 @@ export default {
addCard(){ addCard(){
this.$Message.success("新建工艺案例") this.$Message.success("新建工艺案例")
}, },
changeCards(list){ changeCards(list){//多选方法
this.checkCards = list.length this.checkCards = list.length
}, },
changeCard(value){ changeCard(value){
console.log(111) console.log(111)
}, },
cancel(){//底部取消
this.checkCards = 0;
}
}, },
} }
</script> </script>
...@@ -355,7 +355,7 @@ ...@@ -355,7 +355,7 @@
} }
} }
.slip{ .slip{
margin-right: 20px; margin-right: 10px;
i.ivu-icon{ i.ivu-icon{
font-size: 32px; font-size: 32px;
transform:rotate(90deg); transform:rotate(90deg);
...@@ -367,13 +367,13 @@ ...@@ -367,13 +367,13 @@
} }
} }
.case_box{ .case_box{
padding: 10px 20px; padding: 10px 20px 44px;
height: calc(100vh - 210px); height: calc(100vh - 210px);
overflow-y: auto; overflow-y: auto;
.file_card{ .file_card{
background: #F5F6FA; background: #F5F6FA;
margin: 10px 50px; margin: 15px 50px;
width: 360px; width: 367px;
padding: 18px; padding: 18px;
height: 110px; height: 110px;
line-height: 24px; line-height: 24px;
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
float: left; float: left;
margin: 0 8px 0 0; margin: 0 8px 0 0;
i{ i{
font-size: 58px; font-size: 62px;
} }
} }
} }
......
...@@ -26,16 +26,11 @@ ...@@ -26,16 +26,11 @@
<h2>时间段展示</h2><!-- 默认为datetime类型,可设置为date型,type="date";默认展示快捷时间段,包括当天、本周、本月,如不需要:showFast="false" --> <h2>时间段展示</h2><!-- 默认为datetime类型,可设置为date型,type="date";默认展示快捷时间段,包括当天、本周、本月,如不需要:showFast="false" -->
<DTSearch v-model="testDate1" @on-change="setTime" type="date" ></DTSearch> <DTSearch v-model="testDate1" @on-change="setTime" type="date" ></DTSearch>
<div> <div>
<i-switch v-model="sitch"/> <i-switch v-model="witch"/>
</div> </div>
<div style="text-align:center"> <div style="text-align:center">
<User value="46"/> <DepartmentSelect :type="3"/>
<User value="43"/>
<User value="44"/>
<User value="115"/>
<User value="37"/>
</div> </div>
<User value="46"/>
</div> </div>
</template> </template>
<script> <script>
...@@ -47,7 +42,7 @@ export default { ...@@ -47,7 +42,7 @@ export default {
data() { data() {
return { return {
user: 0, user: 0,
switch:false, witch:false,
parms: { parms: {
app: 'bug', //服务名 app: 'bug', //服务名
eid: '10000', //数据的id eid: '10000', //数据的id
......
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