Commit d7a98daa authored by renjintao's avatar renjintao

bug

parent ba16e0c2
<template> <template>
<span class="i-layout-header-trigger i-layout-header-trigger-min"> <span class="i-layout-header-trigger i-layout-header-trigger-min">
<Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown"> <Dropdown transfer trigger="hover" @on-click="handleClickUserDropdown">
<span @click="openModelBugAdd"> <span @click="openModelBugAdd">
<Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]"> <Badge :count="bugCount === 0 ? null : bugCount" :overflow-count="99" :offset="[10, 0]">
<Icon type="ios-bug" size="18" /> <Icon type="ios-bug" size="18" />
</Badge> </Badge>
</span> </span>
<Icon type="md-arrow-dropdown"></Icon> <Icon type="md-arrow-dropdown"></Icon>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
<DropdownItem name="bug">bug列表</DropdownItem> <DropdownItem name="bug">bug列表</DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
<Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="10"> <Modal title="新增bug" v-model="bugAdd" fullscreen :z-index="999">
<addBugModal ref="addBug"></addBugModal> <addBugModal ref="addBug"></addBugModal>
<div slot="footer"> <div slot="footer">
<Button @click="addCancel">取消</Button> <Button @click="addCancel">取消</Button>
<Button type="primary" @click="addSave">确定</Button> <Button type="primary" @click="addSave">确定</Button>
</div> </div>
</Modal> </Modal>
</span> </span>
</template> </template>
<script> <script>
import addBugModal from "@/pages/bug/component/add"; import addBugModal from "@/pages/bug/component/add";
export default { export default {
name: "addBug", name: "addBug",
components: { components: {
addBugModal addBugModal
},
data() {
return {
bugAdd: false,
bugCount:3
};
},
computed: {},
methods: {
async handleClickUserDropdown(name) {
if (name === "bug") {
this.$router.push({ name: "bug" });
}
}, },
openModelBugAdd() { data() {
this.bugAdd = true; return {
this.$refs.addBug.getEid(); bugAdd: false,
this.$refs.addBug.initial(); bugCount: 3
};
}, },
addCancel() { computed: {},
this.$refs.addBug.resetFields(); methods: {
this.bugAdd = false; async handleClickUserDropdown(name) {
if (name === "bug") {
this.$router.push({
name: "bug"
});
}
},
openModelBugAdd() {
this.bugAdd = true;
this.$refs.addBug.getEid();
this.$refs.addBug.initial();
},
addCancel() {
this.$refs.addBug.resetFields();
this.bugAdd = false;
},
addSave() {
let param = this.$refs.addBug.addBugInfo();
//alert(JSON.stringify(param))
if (param.id == null) {
//增加确定
this.$http.bug.createorupdate(param).then(res => {
if (res.result.status) {
this.$Message.success("新增成功!");
let newId = res.result.bugId;
this.$refs.addBug.updateEid(newId);
} else {
this.$Message.error("新增失败!");
}
this.$refs.addBug.resetFields();
this.bugAdd = false;
});
} else {
this.$Message.error("新增失败!");
}
}
}, },
addSave() { created() {},
let param = this.$refs.addBug.addBugInfo(); mounted() {}
//alert(JSON.stringify(param))
if (param.id == null) {
//增加确定
this.$http.bug.createorupdate(param).then(res => {
if (res.result.status) {
this.$Message.success("新增成功!");
let newId = res.result.bugId;
this.$refs.addBug.updateEid(newId);
} else {
this.$Message.error("新增失败!");
}
this.$refs.addBug.resetFields();
this.bugAdd = false;
});
} else {
this.$Message.error("新增失败!");
}
}
},
created() {},
mounted() {}
}; };
</script> </script>
\ 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