Commit 80eb8279 authored by 周远喜's avatar 周远喜

ok

parent d0db7270
...@@ -2151,7 +2151,7 @@ document_category: { ...@@ -2151,7 +2151,7 @@ document_category: {
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
title: '标题', title: '标题',
note: '请注意', note: '备注',
template: '模板', template: '模板',
attachment: '附件', attachment: '附件',
type: '模版类型', type: '模版类型',
......
<template>
<div>项目管理</div>
</template>
\ No newline at end of file
...@@ -26,6 +26,12 @@ export default { ...@@ -26,6 +26,12 @@ export default {
} }
}); });
}, },
saveTemplate(params){
return Api.post('projecttemplate/create',params)
},
useTemplate(params){
return Api.post('projecttemplate/usetemplate',params)
},
deletes(params) { deletes(params) {
return Api.post(`${material}/projectplan/batchdelete`, params); return Api.post(`${material}/projectplan/batchdelete`, params);
} }
......
<template> <template>
<div> <div>
<Card> <Card>
<EditGrid :columns="columns" ref="grid" :items="list" :level="8" :drag="true" > <EditGrid
:columns="columns"
ref="grid"
:items="list"
:level="8"
:drag="true"
>
<template slot="easySearch" <template slot="easySearch"
><Form ref="formInline" :model="easySearch" inline ><Form ref="formInline" :model="easySearch" inline
><FormItem prop="keys" ><FormItem prop="keys"
...@@ -20,6 +26,25 @@ ...@@ -20,6 +26,25 @@
</template> --> </template> -->
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add(null)">新增</Button> <Button type="primary" @click="add(null)">新增</Button>
<Dropdown @on-click="show">
<Button shape="circle" icon="md-settings"></Button>
<DropdownMenu slot="list">
<DropdownItem name="saveTemplate">存为模版</DropdownItem>
<DropdownItem name="useTemplate">导入模版</DropdownItem>
<DropdownItem name="down">
<Icon
type="md-cloud-download"
class="mr10"
/>导出Excel</DropdownItem
>
<DropdownItem name="importExcel"
><Icon
type="md-cloud-upload"
class="mr10"
/>导入Excel</DropdownItem
>
</DropdownMenu>
</Dropdown>
</template> </template>
</EditGrid> </EditGrid>
</Card> </Card>
...@@ -363,6 +388,20 @@ export default { ...@@ -363,6 +388,20 @@ export default {
this.curId = null; this.curId = null;
this.modal = false; this.modal = false;
}, },
show(name){
var that=this;
var m= {
saveTemplate(name){
that.curId = that.eid;
that.row = that.data;
that.title = "保存模版";
that.detail = () => import("./saveTemplate");
that.modal = true;
}
}
m[name]&&m[name](name);
},
l(key) { l(key) {
let vkey = "project_plan" + "." + key; let vkey = "project_plan" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="24"
><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('note')" prop="note">
<Input
v-model="entity.note"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" noClick
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
title: this.v.title,
note: "",
projectId: this.eid,
attachment: "",
type: 0,
},
rules: {
title: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
v: Object,
eid: String,
},
mounted() {
if (this.eid ) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
Api.create(this.entity)
.then((r) => {
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "project_template" + "." + key;
return this.$t(key);
},
},
};
</script>
\ No newline at end of file
<template>
<div class="setings">
<Menu
mode="horizontal"
:theme="theme1"
active-name="1"
@on-select="tabsSel"
>
<MenuItem name="1">
<Icon type="md-contacts" />
团队管理
</MenuItem>
<MenuItem name="2">
<Icon type="ios-document" />
项目模板
</MenuItem>
</Menu>
<keep-alive>
<component v-bind:is="detail"></component>
</keep-alive>
</div>
</template>
<script>
import Api from "../../../api";
export default {
name: "projectSetings",
data() {
return {
theme1: "light",
detail: null,
};
},
mounted() {
this.group();
},
methods: {
tabsSel(name) {
if (name == 1) {
this.group();
} else {
this.template();
}
},
group() {
this.detail = () => import("./group");
},
template() {
this.detail = () => import("./templates");
},
},
};
</script>
<template> <template>
<div>项目资源</div> <div class="setings">
<Menu
mode="horizontal"
:theme="theme1"
active-name="1"
@on-select="tabsSel"
>
<MenuItem name="1">
<Icon type="md-contacts" />
团队管理
</MenuItem>
<MenuItem name="2">
<Icon type="ios-document" />
项目模板
</MenuItem>
</Menu>
<keep-alive>
<component v-bind:is="detail"></component>
</keep-alive>
</div>
</template> </template>
<script>
import Api from "../../../api";
export default {
name: "projectSetings",
data() {
return {
theme1: "light",
detail: null,
};
},
mounted() {
this.group();
},
methods: {
tabsSel(name) {
if (name == 1) {
this.group();
} else {
this.template();
}
},
group() {
this.detail = () => import("./group");
},
template() {
this.detail = () => import("./templates");
},
},
};
</script>
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