Commit d1414c4f authored by 佟礼's avatar 佟礼

Merge branch 'product' of 39.98.128.195:zhouyx/mes-ui into product

parents 8ab46640 6a92257f
...@@ -1296,6 +1296,9 @@ html [type=button] { ...@@ -1296,6 +1296,9 @@ html [type=button] {
.detail .ivu-row .filed-col p .html p{ .detail .ivu-row .filed-col p .html p{
margin: 0 10px 0 0; margin: 0 10px 0 0;
} }
.con_bord {
margin: 10px 20px;
}
.lay100 { .lay100 {
height: calc(100vh - 105px); height: calc(100vh - 105px);
background-color: #f5f6fa; background-color: #f5f6fa;
...@@ -1303,7 +1306,7 @@ html [type=button] { ...@@ -1303,7 +1306,7 @@ html [type=button] {
padding: 5px 5px 0px 10px; padding: 5px 5px 0px 10px;
} }
.con_bord { .con_bord {
// margin: 15px 32px; margin: 10px 20px;
box-shadow: #c7c7c7 1px 2px 7px 3px; box-shadow: #c7c7c7 1px 2px 7px 3px;
} }
background: rgba(245, 246, 250, 1); background: rgba(245, 246, 250, 1);
......
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
this.$http.storeHouse this.$http.storeHouse
.getpaged({ materialType: this.type }) .getpaged({ materialType: this.type })
.then((res) => { .then((res) => {
console.log(res.result)
if (res.result) { if (res.result) {
let items = res.result let items = res.result
this.tree = this.getTrees(items) this.tree = this.getTrees(items)
......
<template>
<div class="flex fd tree-menu">
<h3>
产品结构
<div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small">
<Button
:icon="expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree"></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
</h3>
<div class="search">
<Input search placeholder="关键字" v-model="keys" clearable />
</div>
<div class="fg">
<div class="tree">
<Tree :data="tree" ref="tree" @on-select-change="change" :render="renderContent"></Tree>
</div>
</div>
</div>
</template>
<script>
export default {
name: "",
data() {
return {
expand: false,
ids: [],
tree: [],
divHeight:'',
keys: "",
// list: []
};
},
created() {
this.loadTree();
},
methods: {
toggle() {
this.expand = !this.expand;
this.loadTree()
},
async loadTree() {
this.$http.storeHouse
.getpaged({ materialType: this.type })
.then((res) => {
console.log(res.result)
if (res.result) {
let items = res.result;
// let item = this.$u.clone(res.result);
console.log('items:',items)
this.tree = this.getTrees(items)
this.change1(this.tree)
search(this.keys, items);
function search(keys, items) {
items.map(u => {
if (keys.length < 3) {
u.expand = expand;
result.push(u);
} else {
u.expand = expand;
if (u.title.indexOf(keys) > -1) {
result.push(u);
} else if (u.children) {
search(keys, u.children);
}
}
});
}
} else {
this.$Message.error('加载库房库位树失败!')
}
})
},
//重构左侧树
getTrees(trees) {
var expand = this.expand
trees.forEach((data, index) => {
var that = this
data.expand = expand
if (data.children.length > 0) {
this.getTrees(data.children)
}
})
return trees
},
renderContent(h, { root, node, data }) {
return h(
'span',
{
style: {
color: data.isClick ? '#000' : '#bbb', //根据选中状态设置样式
cursor: data.isClick ? 'pointer' : '',
background: node.node.selected&&data.isClick ? '#AAD8D4' : '#ffffff',
paddingLeft: '10px',
paddingRight: '10px',
paddingTop: '3px',
paddingBottom: '3px'
},
on: {
// click: () => {
// if (!node.node.selected) {
// this.$refs.tree.handleSelect(node.nodeKey) //手动选择树节点
// }
// }
}
},
data.title
)
},
//得到此树节点下所有是产品的Id
getAllIds(trees) {
trees.forEach((data, index) => {
var that = this
if (data.isClick) {
this.ids.push(data.id)
}
if (data.children.length > 0) {
this.getAllIds(data.children)
}
})
},
change(value) {
if (value.length > 0) {
if (value[0].isClick) {
this.ids = []
this.getAllIds(value)
if (this.ids.length > 0) {
this.$emit('storeIds', this.ids)
//this.easySearch.storeId.value = this.ids
} else {
this.$emit('storeIds', [-1])
}
} else {
this.$Message.error('当前操作用户无此库位的权限')
this.$emit('storeIds', [-1])
}
}
},
change1(value) {
if (value.length > 0) {
this.ids = []
this.getAllIds(value)
if (this.ids.length > 0) {
this.$emit('storeIds', this.ids)
} else {
this.$emit('storeIds', [-1])
}
}
},
// loadTree() {
// this.$http.storeHouse.getpaged({ materialType: this.type })
// .then(r => {
// console.log(r.result)
// var data = r.result;
// this.list = this.$u.clone(data);
// })
// },
// change(v, b) {
// let ids = [];
// ids.push(b.value);
// if (b.children) {
// addId(b.children);
// function addId(data) {
// data.map(u => {
// ids.push(u.value);
// if (u.children) {
// addId(u.children);
// }
// });
// }
// }
// this.$emit("on-select", b.value, b, ids);
// },
hide() {
this.$emit("on-hide");
}
},
computed: {
data() {
let items = this.$u.clone(this.list);
let expand = this.expand;
let result = [];
search(this.keys, items);
function search(keys, data) {
data.map(u => {
if (keys.length < 3) {
u.expand = expand;
result.push(u);
} else {
u.expand = expand;
if (u.title.indexOf(keys) > -1) {
result.push(u);
} else if (u.children) {
search(keys, u.children);
}
}
});
}
return result;
}
}
};
</script>
<style lang="less">
.tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: rgba(81, 90, 110, 1);
background:rgba(245,246,250,1);
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
padding: 5px 10px;
}
.fg {
flex: none;
// height:0;
overflow: auto;
padding-left: 10px;
}
.tree {
height: calc(100vh - 215px);
overflow: auto;
}
}
</style>
\ No newline at end of file
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
search: { search: {
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
conditions: [] conditions: [],
}, },
pageSizeOpts: [20, 50, 100], pageSizeOpts: [20, 50, 100],
tableHeight: 0, tableHeight: 0,
......
<template>
<div class="remote" >
<component :is="currentView" v-bind="$props" @onChange="hi"/>
</div>
</template>
<script>
import Axios from "axios";
// import '@/utils/less.min';
export default {
props: {
url: {
type: String,
default() {
return null;
}
}
},
data() {
return {
resData: null,
cssId: null
};
},
computed: {
currentView() {
if (!this.resData)
return { template: "<div class='remoteInfo'>正在加载中。。。</div>" };
const tplData = this.resolveStr(this.resData);
let ponentObj = new Function(
`return ${tplData.sctipts.slice(
tplData.sctipts.indexOf("{"),
tplData.sctipts.lastIndexOf("}") + 1
)}`
)();
ponentObj.template = tplData.templates;
// this.$el.setAttribute('class',`remote css${this.cssId}`);
// if(!document.querySelector(`style[id=css${this.cssId}]`)){//防止重复创建
// let cssStr = `
// .css${this.cssId}{
// ${tplData.styles}
// }
// `;
// this.resolveCss(cssStr);
// }
return ponentObj;
}
},
watch: {
url() {
this.getData();
}
},
mounted() {
this.getData();
},
methods: {
hi(v){
alert(v)
},
getId() {
var d = new Date().getTime();
var uid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
/[xy]/g,
function(c) {
var r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c == "x" ? r : (r & 0x3) | 0x8).toString(16);
}
);
return uid;
},
resolveCss(lessInput) {
less.render(lessInput).then(
function(output) {
let style = document.createElement("style");
style.setAttribute("type", "text/css");
style.setAttribute("id", "css" + this.cssId);
if (style.styleSheet)
// IE
style.styleSheet.cssText = output.css;
else {
// w3c
var cssText = document.createTextNode(output.css);
style.appendChild(cssText);
}
var heads = document.getElementsByTagName("head");
if (heads.length) heads[0].appendChild(style);
else document.documentElement.appendChild(style);
}.bind(this)
);
},
resolveStr(str) {
return {
templates: str.match(/<template>([\s\S]*)<\/template>/)[1],
sctipts: str.match(/<script.*>([\s\S]*)<\/script>/)[1],
// styles: str.match(/<style.*>([\s\S]*)<\/style>/)[1]
};
},
async getData() {
// let remoteData = this.$store.getters.getRemoteByUrl(this.url);
// if(remoteData){
// this.resData = remoteData.resData;
// this.cssId = remoteData.cssId;
// }else{
if (this.$props.url) {
const res = await Axios.get(this.$props.url);
// this.cssId = this.getId();
this.resData = res.data;
console.log(this.resData)
}
// this.$store.dispatch('doAction',{
// event:'addRemote',
// data:{url:this.url,cssId:this.cssId,resData:this.resData}
// });
// }
}
// async getData(){
// let remoteData = this.$store.getters.getRemoteByUrl(this.url);
// if(remoteData){
// this.resData = remoteData.resData;
// this.cssId = remoteData.cssId;
// }else{
// const res = await Axios.get(this.$props.url);
// this.cssId = this.getId();
// this.resData = res.data;
// this.$store.dispatch('doAction',{
// event:'addRemote',
// data:{url:this.url,cssId:this.cssId,resData:this.resData}
// });
// }
// }
}
};
</script>
\ No newline at end of file
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ export default {
} }
}, },
extend(config, ctx) { extend(config, ctx) {
config.resolve.alias['vue$']='vue/dist/vue.esm.js'
// config.resolve.alias['_c']=path.resolve(__dirname, 'components') // config.resolve.alias['_c']=path.resolve(__dirname, 'components')
// config.module.rules.push({ // config.module.rules.push({
// enforce:'pre', // enforce:'pre',
......
<template>
<div class="checkbox-list">
<Row class="check-title">
<Col span="20">
<div>
<!-- :indeterminate="indeterminate" -->
<!-- :label="resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''" -->
<Checkbox
:label="singleList.equip_name"
v-model="checkAll"
@click.prevent.native="handleCheckAll(singleList.shop_id)"
>{{singleList.equip_name}}</Checkbox>
<!-- {{resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''}} -->
</div>
</Col>
<Col span="4">
<div class="icon-down">
<Icon type="ios-arrow-down" v-if="!singleList.isClick" @click="upDown(singleList)"></Icon>
<Icon type="ios-arrow-up" v-if="singleList.isClick" @click="upDown(singleList)"></Icon>
</div>
</Col>
</Row>
<ul v-show="singleList.isClick">
<li
ref="liId"
v-for="(item,index) in list"
:key="index"
@click="onclick(index)"
>{{item.name}}&nbsp&nbsp{{item.class}}</li>
</ul>
<!-- <CheckboxGroup
v-model="checkAllGroup"
@on-change="checkAllGroupChange"
v-if="singleList.isClick"
>-->
<!-- :label="resourcesType==0?item.user_name:resourcesType==2?item.equip_name:''" -->
<!-- <Checkbox v-for="(item,index) in list" :key="index" :label="item.name">{{item.name}}</Checkbox>
</CheckboxGroup>-->
</div>
</template>
<script>
import Api from "./api";
export default {
name: "CheckboxList",
props: ["singleList"],
data() {
return {
chooseNum: null,
indeterminate: true,
checkAll: false,
checkAllGroup: [],
typeIcon: "ios-arrow-down",
show: -1,
list: [
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
}
],
taglistData: []
};
},
mounted() {
// this.checkList()
},
methods: {
onclick(index) {
if (this.$refs.liId[index].className.length <= 0) {
this.$refs.liId[index].className = "li-focus"; // 添加类
let list = [];
this.$refs.liId.forEach((element, index) => {
if (this.$refs.liId[index].className) {
list.push(this.$refs.liId[index].className);
}
});
if (list.length == this.list.length) {
this.checkAll = true;
}
} else {
this.$refs.liId[index].className = ""; // 选中再取消的情况
this.checkAll = false;
}
},
handleCheckAll(id) {
this.checkAll = !this.checkAll;
if (this.checkAll) {
this.$refs.liId.forEach((element, index) => {
this.$refs.liId[index].className = "li-focus"; // 添加类
});
} else {
this.$refs.liId.forEach((element, index) => {
this.$refs.liId[index].className = ""; // 选中再取消的情况
});
}
// // console.log(this.list)
// // this.list.map((u) => {
// // console.log(u)
// // })
// // this.checkList(id)
// this.checkAll = !this.checkAll;
// if (this.checkAll) {
// let listNew = [];
// this.list.map(u => {
// if (this.resourcesType == 0) {
// listNew.push(u.user_name);
// } else if (this.resourcesType == 2) {
// listNew.push(u.equip_name);
// }
// });
// this.checkAllGroup = listNew;
// this.$emit("changeData", this.checkAllGroup);
// } else {
// this.checkAllGroup = [];
// }
},
// checkAllGroupChange(data) {
// console.log(data);
// console.log(this.list);
// this.checkAllGroup = data;
// this.$emit("changeData", this.checkAllGroup);
// if (data.length === this.list.length) {
// this.indeterminate = false;
// this.checkAll = true;
// } else if (data.length > 0) {
// this.indeterminate = true;
// this.checkAll = false;
// } else {
// this.indeterminate = false;
// this.checkAll = false;
// }
// },
checkList(id) {
if (this.resourcesType == 0) {
//班组
Api.getbyshopid({ shop_id: id }).then(r => {
// console.log(r)
if (r.success) {
r.result.forEach(e => {
e.ischeckBox = false;
});
this.list = r.result;
}
});
} else if (this.resourcesType == 2) {
//设备
Api.getbyequippk({ equip_pk: 91 }).then(r => {
// console.log(r)
if (r.success) {
r.result.forEach(e => {
e.ischeckBox = false;
});
this.list = r.result;
}
});
}
},
upDown(post) {
if (!post.isClick) {
this.$set(post, "isClick", true);
this.checkList(post.shop_id);
} else {
this.$set(post, "isClick", false);
}
}
}
// watch: {
// list: {
// handler(newVal, oldVal) {
// console.log('深度监听', newVal, oldVal)
// },
// deep: true
// }
// }
};
</script>
<style lang="less" scoped>
.checkbox-list {
.icon-down {
text-align: right;
cursor: pointer;
}
.check-title {
height: 40px;
line-height: 40px;
padding: 0 10px;
background: rgba(38, 128, 235, 0.5);
}
ul {
min-height: 60px;
padding: 10px 5px;
display: flex;
li {
list-style-type: none;
text-align: center;
width: 100px;
height: 30px;
line-height: 30px;
border-radius: 20px;
margin: 0 5px;
cursor: pointer;
background: rgba(38, 128, 235, 0.1);
}
li:hover {
border: 1px solid rgba(38, 128, 235, 0.5);
}
.li-focus {
border: 1px solid rgba(38, 128, 235, 0.5);
}
}
}
</style>
\ No newline at end of file
...@@ -73,27 +73,6 @@ ...@@ -73,27 +73,6 @@
<Tree key="mytree" :data="workShop" ref="mytree" :render="renderContent"></Tree> <Tree key="mytree" :data="workShop" ref="mytree" :render="renderContent"></Tree>
</Select> </Select>
</FormItem> </FormItem>
<!-- <FormItem v-if="formItem.radio==0">
<div class="list-check">
<Checkbox-List
:single-list="li"
ref="groups"
@changeData="setData"
v-for="(li,index) in listGroup"
:key="index"
></Checkbox-List>
</div>
</FormItem>-->
<!-- v-if="tagGroup.lenght>0" -->
<!-- <FormItem label="已选择" v-if="formItem.radio==0">
<div class="tag-list">
<div v-for="(item,index) in tagGroup" :key="index" class="tag-group">
<span>{{item.name}}&nbsp&nbsp{{item.class}}</span>
<Icon type="md-close" @click="closeTag" />
</div>
</div>
</FormItem>-->
<FormItem label="备注"> <FormItem label="备注">
<Input <Input
v-model="formItem.remark " v-model="formItem.remark "
......
...@@ -14,7 +14,13 @@ export default { ...@@ -14,7 +14,13 @@ export default {
getdetail(params) { getdetail(params) {
return Api.get(`${apsUrl}/scheduletotal/getdetail`, params); return Api.get(`${apsUrl}/scheduletotal/getdetail`, params);
}, },
processschemedispatch(params) { processschemedispatch(params) { //插单检查后,“否”不操作,“是”:如果result.retcode=1,调用:
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params); return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch`, params);
}, },
checkisinsertandbadjust(params) { //点击下发是调用接口;方案下发前的插单检查,返回后弹框,提示内容未result.retmsg
return Api.post(`${apsUrl}/apspoolappservices/checkisinsertandbadjust`, params);
},
processschemedispatchinsert(params) { //排产方案下发--普通+干扰;如果result.retcode=0,调用:
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch_insert`, params);
},
} }
<style lang="less"> <style lang="less">
@import './results.less'; @import "./results.less";
</style> </style>
<template> <template>
<div class="results"> <div class="results">
...@@ -29,24 +29,24 @@ ...@@ -29,24 +29,24 @@
</div> </div>
</Sider> </Sider>
<Content class="tab_card_box"> <Content class="tab_card_box">
<Tabs class="tab_card" value="name1" type="card" :animated="false"> <Tabs class="tab_card" v-model="name" type="card" :animated="false" @on-click="clickTab">
<TabPane label="结果列表" name="name1"> <TabPane label="结果列表" name="name1">
<resultsList ref="resultsList"/> <resultsList ref="resultsLists" />
</TabPane> </TabPane>
<!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> --> <!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> -->
<TabPane label="方案对比" name="name3"> <TabPane label="方案对比" name="name3">
<compareList ref="compareList"/> <compareList ref="compareList" />
</TabPane> </TabPane>
</Tabs> </Tabs>
<!-- <h4>排产结果</h4> <!-- <h4>排产结果</h4>
<div class="btn"> <div class="btn">
<Button type="primary" @click="parameter">下发</Button> --> <Button type="primary" @click="parameter">下发</Button>-->
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div> </div>
<div> <div>
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>
</div> --> </div>-->
</Content> </Content>
</Layout> </Layout>
</div> </div>
...@@ -58,14 +58,15 @@ import resultsList from "./result.vue"; ...@@ -58,14 +58,15 @@ import resultsList from "./result.vue";
import compareList from "./compare.vue"; import compareList from "./compare.vue";
export default { export default {
components: { resultsList,compareList }, components: { resultsList, compareList },
data() { data() {
return { return {
isactive: 0, isactive: 0,
data: [], data: [],
list: [], list: [],
id: "", name:'name1',
id: ""
// columns: [ // columns: [
// { // {
// type: "expand", // type: "expand",
...@@ -150,6 +151,8 @@ export default { ...@@ -150,6 +151,8 @@ export default {
this.orderlist(); this.orderlist();
}, },
methods: { methods: {
clickTab(name) {
},
orderlist() { orderlist() {
Api.getall() Api.getall()
.then(r => { .then(r => {
......
<style lang="less"> <style lang="less">
@import './results.less'; @import "./results.less";
</style> </style>
<template> <template>
<div> <div>
<div class="btn" style="z-index:9999;position:absolute;right:0"> <div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter" v-show="showNext">下发</Button>
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div> </div>
<div> <div>
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import expandRow from "./table-expand.vue"; import expandRow from "./table-expand.vue";
export default { export default {
components: { expandRow }, components: { expandRow },
data() { data() {
return { return {
isactive: 0, isactive: 0,
data: [], data: [],
list: [], list: [],
showNext: true,
columns: [ columns: [
{ {
type: "expand", type: "expand",
...@@ -97,11 +98,11 @@ export default { ...@@ -97,11 +98,11 @@ export default {
key: "plan_qty", key: "plan_qty",
align: "center" align: "center"
} }
], ]
} };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
components: {}, components: {},
created() { created() {
...@@ -140,14 +141,49 @@ export default { ...@@ -140,14 +141,49 @@ export default {
}, },
// 下发 // 下发
parameter() { parameter() {
Api.processschemedispatch({ Api.checkisinsertandbadjust({
//方案下发前的插单检查
id: this.id id: this.id
}).then(r => { }).then(r => {
if (r.result) { if (r.result) {
this.$Message.success(r.result.retmsg); this.$Modal.confirm({
this.orderlist(); title: "结果下发",
content: r.result.retmsg,
onOk: () => {
if (r.result.retcode == 1) {
//排产方案下发--普通+干扰
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.error("下发失败");
}
});
} else if (r.result.retcode == 0) {
//排产方案下发--有插单
Api.processschemedispatchinsert({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.error("下发失败");
}
});
} else {
this.$Message.error("下发失败");
}
},
onCancel: () => {
this.$Message.info("取消下发");
}
});
} else { } else {
this.$Message.success("下发失败"); this.$Message.info("不能下发");
} }
}); });
}, },
...@@ -156,16 +192,15 @@ export default { ...@@ -156,16 +192,15 @@ export default {
this.$router.push({ path: "/aps/aps" }); this.$router.push({ path: "/aps/aps" });
}, },
tabChange(name) { tabChange(name) {
if(name=='technicalcoordination') if (name == "technicalcoordination") {
{ this.$refs.technicalcoordination.loadchangelist();
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder'){
this.$refs.unqualifiedorder.loadchangelist();
} }
}, if (name == "unqualifiedorder") {
this.$refs.unqualifiedorder.loadchangelist();
}
}
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<template>
<div>
<Button type="dashed">新增</Button>
</div>
</template>
\ No newline at end of file
<template>
<div>
<Button type="dashed">新增</Button>
</div>
</template>
\ No newline at end of file
<template>
<div>
<Button type="dashed">详情</Button>
</div>
</template>
\ No newline at end of file
...@@ -3,7 +3,16 @@ ...@@ -3,7 +3,16 @@
<Sider hide-trigger :style="{ background: '#fff' }" class="menu" width="240" style=" flex:0;"> <Sider hide-trigger :style="{ background: '#fff' }" class="menu" width="240" style=" flex:0;">
<StoreHouseLeft @storeIds="storeIds" :type="1"></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" :type="1"></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <!-- <Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> -->
<!-- <storeHouseTree @on-hide="onHide" @storeIds="storeIds" :type="1"/> -->
<!-- @on-select="productSearch" -->
<!-- </Sider> -->
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -73,6 +82,7 @@ import Detail from "./detail"; ...@@ -73,6 +82,7 @@ import Detail from "./detail";
import Search from "./search"; import Search from "./search";
import Inventory from "./inventory"; import Inventory from "./inventory";
import StoreHouseLeft from "@/components/modalTree/storeHouseLeft.vue"; import StoreHouseLeft from "@/components/modalTree/storeHouseLeft.vue";
import storeHouseTree from '@/components/modalTree/storeHouseTree.vue'
export default { export default {
name: "list", name: "list",
components: { components: {
...@@ -81,10 +91,12 @@ export default { ...@@ -81,10 +91,12 @@ export default {
Detail, Detail,
Search, Search,
Inventory, Inventory,
StoreHouseLeft StoreHouseLeft,
storeHouseTree
}, },
data() { data() {
return { return {
showMenu: true,
action: Api.index, action: Api.index,
addModal: false, addModal: false,
editModal: false, editModal: false,
...@@ -316,6 +328,20 @@ export default { ...@@ -316,6 +328,20 @@ export default {
this.tdHeight = window.innerHeight - 260 this.tdHeight = window.innerHeight - 260
}, },
methods: { methods: {
onHide() {
this.showMenu = false;
},
showMenuFn() {
this.showMenu = true;
},
// productSearch(id, item, ids) {
// let where = { productId: { op: "In", value: ids } };
// this.$refs.grid.reload(where);
// },
storeIds(val) {
this.easySearch.storeId.value = val;
this.$refs.grid.easySearch();
},
addOk() { addOk() {
this.$refs.grid.load(); this.$refs.grid.load();
this.addModal = false; this.addModal = false;
...@@ -389,10 +415,6 @@ export default { ...@@ -389,10 +415,6 @@ export default {
let vkey = "MaterialPowder" + "." + key; let vkey = "MaterialPowder" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
}, },
storeIds(val) {
this.easySearch.storeId.value = val;
this.$refs.grid.easySearch();
}
} }
}; };
</script> </script>
...@@ -63,6 +63,7 @@ import Detail from './detail' ...@@ -63,6 +63,7 @@ import Detail from './detail'
import Search from './search' import Search from './search'
import Inventory from './inventory' import Inventory from './inventory'
import StoreHouseLeft from '@/components/modalTree/storeHouseLeft.vue' import StoreHouseLeft from '@/components/modalTree/storeHouseLeft.vue'
// import StoreHouseLeft from '@/components/modalTree/storeHouseTree.vue'
export default { export default {
name: 'list', name: 'list',
components: { components: {
......
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}); });
} }
}, },
{ key: "taskSeq", title: this.l("taskSeq"), align: "left",width:80 }, { key: "taskSeq", title: this.l("taskSeq"), align: "left",width:100,sortable:true },
{ {
key: "name", key: "name",
title: this.l("name"), title: this.l("name"),
......
...@@ -49,8 +49,9 @@ export default { ...@@ -49,8 +49,9 @@ export default {
"checkParams,standard", "checkParams,standard",
value: null value: null
}, },
routingHeaderId: { op: "Equal", value: -1 } routingHeaderId: { op: "Equal", value: -1 },
}, },
sortType: 'normal',
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
...@@ -78,7 +79,8 @@ export default { ...@@ -78,7 +79,8 @@ export default {
title: this.l("routingDetailNo"), title: this.l("routingDetailNo"),
align: "left", align: "left",
high: true, high: true,
width: 80 width: 100,
sortable:true
}, },
{ {
key: "routingDetailName", key: "routingDetailName",
...@@ -357,7 +359,7 @@ export default { ...@@ -357,7 +359,7 @@ export default {
l(key) { l(key) {
let vkey = "routing_qc_card" + "." + key; let vkey = "routing_qc_card" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
} },
} }
}; };
</script> </script>
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</Col> </Col>
<Col :span="12" v-if="condition.creatorUserId.show"> <Col :span="12" v-if="condition.creatorUserId.show">
<FormItem :label="l('creatorUserId')" prop="creatorUserId"> <FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"></Input> <UserSelect v-model="condition.creatorUserId.value"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" v-if="condition.lastModificationTime.show"> <Col :span="12" v-if="condition.lastModificationTime.show">
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</Col> </Col>
<Col :span="12" v-if="condition.lastModifierUserId.show"> <Col :span="12" v-if="condition.lastModifierUserId.show">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value"></Input> <UserSelect v-model="condition.lastModifierUserId.value"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" v-if="condition.deletionTime.show"> <Col :span="12" v-if="condition.deletionTime.show">
......
...@@ -78,7 +78,8 @@ export default { ...@@ -78,7 +78,8 @@ export default {
title: this.l("routingDetailNo"), title: this.l("routingDetailNo"),
align: "left", align: "left",
high: true, high: true,
width: 80 width: 100,
sortable:true
}, },
{ {
key: "routingDetailName", key: "routingDetailName",
......
...@@ -121,30 +121,7 @@ export default { ...@@ -121,30 +121,7 @@ export default {
uId: "", uId: "",
columns: [ columns: [
{ key: "id", title: this.$t("id"), hide: true, align: "left" }, { key: "id", title: this.$t("id"), hide: true, align: "left" },
{
key: "creationTime",
title: this.$t("creationTime"),
align: "left",
hide: true
},
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
hide: true
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
align: "left",
hide: true
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
align: "left",
hide: true
},
{ key: "classId", title: this.l("classId"), align: "left", hide: true }, { key: "classId", title: this.l("classId"), align: "left", hide: true },
{ {
key: "unicode", key: "unicode",
...@@ -244,6 +221,30 @@ export default { ...@@ -244,6 +221,30 @@ export default {
width: 140, width: 140,
high: true, high: true,
code: "Process.Status" code: "Process.Status"
},
{
key: "creationTime",
title: this.$t("creationTime"),
align: "left",
hide: true
},
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
hide: true
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
align: "left",
hide: true
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
align: "left",
hide: true
}, },
{ {
title: "操作", title: "操作",
...@@ -330,6 +331,10 @@ export default { ...@@ -330,6 +331,10 @@ export default {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
}, },
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
// 详情页面 // 详情页面
view(row) { view(row) {
// this.$router.push("technology/details"); // this.$router.push("technology/details");
...@@ -357,10 +362,6 @@ export default { ...@@ -357,10 +362,6 @@ export default {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
......
<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.creationTime.show"><FormItem :label="$t('creationTime')" prop="creationTime"> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker> <Col :span="12" v-if="condition.creationTime.show">
</FormItem></Col> <FormItem :label="$t('creationTime')" prop="creationTime">
<Col :span="12" :v-if="condition.creatorUserId.show"><FormItem :label="$t('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.lastModificationTime.show"><FormItem :label="$t('lastModificationTime')" prop="lastModificationTime"> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.creatorUserId.show">
<Col :span="12" :v-if="condition.lastModifierUserId.show"><FormItem :label="$t('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input> <FormItem :label="$t('creatorUserId')" prop="creatorUserId">
</FormItem></Col> <UserSelect v-model="condition.creatorUserId.value"></UserSelect>
<Col :span="12" :v-if="condition.classId.show"><FormItem :label="l('classId')" prop="classId"> <Input v-model="condition.classId.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.unicode.show"><FormItem :label="l('unicode')" prop="unicode"> <Input v-model="condition.unicode.value"> </Input> <Col :span="12" v-if="condition.lastModificationTime.show">
</FormItem></Col> <FormItem :label="$t('lastModificationTime')" prop="lastModificationTime">
<Col :span="12" :v-if="condition.name.show"><FormItem :label="l('name')" prop="name"> <Input v-model="condition.name.value"> </Input> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.code.show"><FormItem :label="l('code')" prop="code"> <Input v-model="condition.code.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.lastModifierUserId.show">
<Col :span="12" :v-if="condition.productId.show"><FormItem :label="l('productId')" prop="productId"> <Input v-model="condition.productId.value"> </Input> <FormItem :label="$t('lastModifierUserId')" prop="lastModifierUserId">
</FormItem></Col> <UserSelect v-model="condition.lastModifierUserId.value"></UserSelect>
<Col :span="12" :v-if="condition.version.show"><FormItem :label="l('version')" prop="version"> <Input v-model="condition.version.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.author.show"><FormItem :label="l('author')" prop="author"> <Input v-model="condition.author.value"> </Input> <Col :span="12" v-if="condition.classId.show">
</FormItem></Col> <FormItem :label="l('classId')" prop="classId">
<Col :span="12" :v-if="condition.departmentId.show"><FormItem :label="l('departmentId')" prop="departmentId"> <Input v-model="condition.departmentId.value"> </Input> <Input v-model="condition.classId.value"></Input>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.isMain.show"><FormItem :label="l('isMain')" prop="isMain"> <Input v-model="condition.isMain.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.unicode.show">
<Col :span="12" :v-if="condition.upId.show"><FormItem :label="l('upId')" prop="upId"> <Input v-model="condition.upId.value"> </Input> <FormItem :label="l('unicode')" prop="unicode">
</FormItem></Col> <Input v-model="condition.unicode.value"></Input>
<!-- <Col :span="12" :v-if="condition.upDetailId.show"><FormItem :label="l('upDetailId')" prop="upDetailId"> <Input v-model="condition.upDetailId.value"> </Input> </FormItem>
</FormItem></Col> --> </Col>
<Col :span="12" :v-if="condition.routingType.show"><FormItem :label="l('routingType')" prop="routingType"> <Dictionary code="Process.Routing.routingType" v-model="condition.routingType.value"></Dictionary> <Col :span="12" v-if="condition.name.show">
</FormItem></Col> <FormItem :label="l('name')" prop="name">
<Col :span="12" :v-if="condition.status.show"><FormItem :label="l('status')" prop="status"> <Dictionary code="Process.Status" v-model="condition.status.value"></Dictionary> <Input v-model="condition.name.value"></Input>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.approvalStatus.show"><FormItem :label="l('approvalStatus')" prop="approvalStatus"> <Dictionary code="process.RoutingStatus" v-model="condition.approvalStatus.value"></Dictionary> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.code.show">
<Col :span="24" :v-if="condition.remark.show"><FormItem :label="l('remark')" prop="remark"> <Input v-model="condition.remark.value"> </Input> <FormItem :label="l('code')" prop="code">
</FormItem></Col> <Input v-model="condition.code.value"></Input>
<Col :span="12" :v-if="condition.approvalStatusRemark.show"><FormItem :label="l('approvalStatusRemark')" prop="approvalStatusRemark"> <Input v-model="condition.approvalStatusRemark.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.auditUserId1.show"><FormItem :label="l('auditUserId1')" prop="auditUserId1"> <Input v-model="condition.auditUserId1.value"> </Input> <Col :span="12" v-if="condition.productId.show">
</FormItem></Col> <FormItem :label="l('productId')" prop="productId">
<Col :span="12" :v-if="condition.auditUserId2.show"><FormItem :label="l('auditUserId2')" prop="auditUserId2"> <Input v-model="condition.auditUserId2.value"> </Input> <ProductSelect v-model="condition.productId.value"></ProductSelect>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.platesnum.show"><FormItem :label="l('platesnum')" prop="platesnum"> <Input v-model="condition.platesnum.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.version.show">
<Col :span="12" :v-if="condition.isEffect.show"><FormItem :label="l('isEffect')" prop="isEffect"> <Input v-model="condition.isEffect.value"> </Input> <FormItem :label="l('version')" prop="version">
</FormItem></Col> <Input v-model="condition.version.value"></Input>
<Col :span="12" :v-if="condition.versionnotes.show"><FormItem :label="l('versionnotes')" prop="versionnotes"> <Input v-model="condition.versionnotes.value"> </Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12" :v-if="condition.phase.show"><FormItem :label="l('phase')" prop="phase"> <Input v-model="condition.phase.value"> </Input> <Col :span="12" v-if="condition.author.show">
</FormItem></Col> <FormItem :label="l('author')" prop="author">
<Col :span="12" :v-if="condition.versionid.show"><FormItem :label="l('versionid')" prop="versionid"> <Input v-model="condition.versionid.value"> </Input> <UserSelect v-model="condition.author.value"></UserSelect>
</FormItem></Col> </FormItem>
<Col :span="12" :v-if="condition.isSendPpm.show"><FormItem :label="l('isSendPpm')" prop="isSendPpm"> <Input v-model="condition.isSendPpm.value"> </Input> </Col>
</FormItem></Col> <Col :span="12" v-if="condition.departmentId.show">
</Row> <FormItem :label="l('departmentId')" prop="departmentId">
</Form> <departmentSelect v-model="condition.departmentId.value"></departmentSelect>
</FormItem>
</Col>
<Col :span="12" v-if="condition.isMain.show">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="condition.isMain.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.upId.show">
<FormItem :label="l('upId')" prop="upId">
<Input v-model="condition.upId.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.routingType.show">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="condition.routingType.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.status.show">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="condition.status.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.approvalStatus.show">
<FormItem :label="l('approvalStatus')" prop="approvalStatus">
<Dictionary code="process.RoutingStatus" v-model="condition.approvalStatus.value"></Dictionary>
</FormItem>
</Col>
<Col :span="24" v-if="condition.remark.show">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="condition.remark.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.approvalStatusRemark.show">
<FormItem :label="l('approvalStatusRemark')" prop="approvalStatusRemark">
<Input v-model="condition.approvalStatusRemark.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.auditUserId1.show">
<FormItem :label="l('auditUserId1')" prop="auditUserId1">
<Input v-model="condition.auditUserId1.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.auditUserId2.show">
<FormItem :label="l('auditUserId2')" prop="auditUserId2">
<Input v-model="condition.auditUserId2.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.platesnum.show">
<FormItem :label="l('platesnum')" prop="platesnum">
<Input v-model="condition.platesnum.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.isEffect.show">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.state" v-model="condition.isEffect.value"></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="condition.versionnotes.show">
<FormItem :label="l('versionnotes')" prop="versionnotes">
<Input v-model="condition.versionnotes.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.phase.show">
<FormItem :label="l('phase')" prop="phase">
<Input v-model="condition.phase.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.versionid.show">
<FormItem :label="l('versionid')" prop="versionid">
<Input v-model="condition.versionid.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.isSendPpm.show">
<FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.state" v-model="condition.isSendPpm.value"></Dictionary>
</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: {
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 },
classId:{op:"Equal",value:null,show:true}, classId: { op: "Equal", value: null, show: false },
unicode:{op:"Equal",value:null,show:true}, unicode: { op: "Equal", value: null, show: false },
name:{op:"Equal",value:null,show:true},
code:{op:"Equal",value:null,show:true}, name: { op: "Equal", value: null, show: true },
productId:{op:"Equal",value:null,show:true}, code: { op: "Equal", value: null, show: true },
version:{op:"Equal",value:null,show:true}, routingType: { op: "Equal", value: null, show: true },
author:{op:"Equal",value:null,show:true}, productId: { op: "Equal", value: null, show: true },
departmentId:{op:"Equal",value:null,show:true}, version: { op: "Equal", value: null, show: true },
isMain:{op:"Equal",value:null,show:true}, author: { op: "Equal", value: null, show: true },
upId:{op:"Equal",value:null,show:true}, departmentId: { op: "Equal", value: null, show: true },
upDetailId:{op:"Equal",value:null,show:true}, isMain: { op: "Equal", value: null, show: true },
routingType:{op:"Equal",value:null,show:true}, isSendPpm: { op: "Equal", value: null, show: true },
status:{op:"Equal",value:null,show:true}, isEffect: { op: "Equal", value: null, show: true },
approvalStatus:{op:"Equal",value:null,show:true},
remark:{op:"Equal",value:null,show:true},
approvalStatusRemark:{op:"Equal",value:null,show:true},
auditUserId1:{op:"Equal",value:null,show:true},
auditUserId2:{op:"Equal",value:null,show:true},
platesnum:{op:"Equal",value:null,show:true}, upId: { op: "Equal", value: null, show: false },
isEffect:{op:"Equal",value:null,show:true}, upDetailId: { op: "Equal", value: null, show: false },
versionnotes:{op:"Equal",value:null,show:true}, status: { op: "Equal", value: null, show: false },
phase:{op:"Equal",value:null,show:true}, approvalStatus: { op: "Equal", value: null, show: false },
versionid:{op:"Equal",value:null,show:true}, remark: { op: "Equal", value: null, show: false },
isSendPpm:{op:"Equal",value:null,show:true}, approvalStatusRemark: { op: "Equal", value: null, show: false },
}, auditUserId1: { op: "Equal", value: null, show: false },
} auditUserId2: { op: "Equal", value: null, show: false },
}, platesnum: { op: "Equal", value: null, show: false },
methods: { versionnotes: { op: "Equal", value: null, show: false },
handleClose() { phase: { op: "Equal", value: null, show: false },
this.$emit('on-close') versionid: { op: "Equal", value: null, show: false },
},
l(key) {
key = "routingHeader" + "." + key;
return this.$t(key)
} }
} };
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "routingHeader" + "." + key;
return this.$t(key);
} }
}
};
</script> </script>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<Menu mode="horizontal" active-name="1"> <Menu mode="horizontal" active-name="1">
<div class="layout-assistant"> <div class="layout-assistant">
<MenuItem name="1" to="/test/user">人员选择</MenuItem> <MenuItem name="1" to="/test/user">人员选择</MenuItem>
<MenuItem name="2">Option 2</MenuItem> <MenuItem name="2" to="/test/com">异步组件</MenuItem>
<MenuItem name="3">Option 3</MenuItem> <MenuItem name="3">Option 3</MenuItem>
</div> </div>
</Menu> </Menu>
......
<style lang="less">
</style>
<template>
<div class="layout">
<Button @click="load()">异步组件</Button>
<Remote url="/user.txt" @onChange="hi"></Remote>
</div>
</template>
<script>
import Remote from "@/components/page/remote"
export default {
components:{Remote},
methods:{
hi(v){
alert(v)
}
}
}
</script>
\ No newline at end of file
<template>
<div style="padding:50px;">
<UserSelect v-model="user" :multiple="true" theme="list"/>
<!-- <DepartmentSelect v-model="dep" /> -->
<Button @click="setUser">Set</Button>{{dep}}
{{user}}
</div>
</template>
<script>
export default {
data(){
return {
dep:39,
user:[21,22,23]
}
},
methods:{
setUser(){
this.user=[25]
this.$emit("onChange",25)
}
}
}
</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