Commit e2fb9534 authored by 周远喜's avatar 周远喜

ok

parent bf1f23c2
<template> <template>
<div> <div>
<Card> <Card>
<EditGrid :columns="columns" ref="grid" :items="list"> <EditGrid :columns="columns" ref="grid" :items="list"
<template slot="easySearch"> >
<Form ref="formInline" :model="easySearch" inline> <template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
<FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem> <FormItem><Button type="primary" @click="search">查询</Button>
<FormItem><Button type="primary" @click="search">查询</Button> </FormItem>
</FormItem> </Form></template>
</Form>
</template>
<!-- <template slot="searchForm"> <!-- <template slot="searchForm">
<Search /> <Search />
</template> --> </template> -->
...@@ -20,9 +18,8 @@ ...@@ -20,9 +18,8 @@
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
...@@ -36,35 +33,32 @@ export default { ...@@ -36,35 +33,32 @@ export default {
author: "henq", author: "henq",
description: "project_plan 10/19/2020 10:23:07 AM", description: "project_plan 10/19/2020 10:23:07 AM",
}, },
props: { props:{
eid: { eid:{
type: String type:String
}, },
data: { data:{
type: Object, type:Object,
default: () => { default:()=>{
return { return {
id: "33930562-a9f7-bd95-88ab-d01eb1c4c369", id:"33930562-a9f7-bd95-88ab-d01eb1c4c369",
title: "示例项目" title:"示例项目"
} }
} }
} }
}, },
data() { data() {
return { return {
entity: {}, entity:{},
row: {}, row:{},
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: { op: "title", value: null },
op: "title",
value: null
},
}, },
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: null, curId:null,
list: [], list: [],
columns: [ columns: [
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true }, // { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
...@@ -98,73 +92,60 @@ export default { ...@@ -98,73 +92,60 @@ export default {
// } // }
render: (h, params) => { render: (h, params) => {
return h("div", { return h("div", { class: "action" }, [
class: "action"
}, [
h( h(
"op", { "op",
attrs: { {
icon: "md-arrow-dropright-circle", attrs: { icon: "md-arrow-dropright-circle",
type: "icon", type: "icon",
title: "派发", title: "派发",
oprate: "edit", oprate: "edit",
disalbe:1,
}, },
on: { on: { click: () => this.copy(params.row.id) },
click: () => this.copy(params.row.id)
},
}, },
), ),
h( h(
"op", { "op",
attrs: { {
icon: "md-add", attrs: { icon: "md-add",
type: "icon", type: "icon",
title: "新增子任务", title: "新增子任务",
oprate: "edit", oprate: "edit",},
}, on: { click: () => this.add(params.row) },
on: {
click: () => this.add(params.row)
},
} }
), ),
h( h(
"op", { "op",
attrs: { {
icon: "md-eye", attrs: { icon: "md-create",
type: "icon", type: "icon",
title: "编辑", title: "编辑",
oprate: "edit", oprate: "edit", },
}, on: { click: () => this.edit(params.row.id) },
on: {
click: () => this.edit(params.row.id)
},
} }
), ),
h( h(
"op", { "op",
attrs: { {
icon: "ios-trash", attrs: { icon: "ios-trash",
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: "delete", oprate: "delete",
msg: "确认要删除吗?" msg: "确认要删除吗?" },
}, on: { click: () => this.remove(params.row.id) },
on: {
click: () => this.remove(params.row.id)
},
} }
), ),
]); ]);
}, },
}, },
{ {
attrs: { icon: "md-arrow-dropright-circle", key: "type",
type: "icon", width: 90,
title: "派发", title: this.l("type"),
oprate: "edit", align: "left",
disalbe:1, high: true,
}, code: "mes.project_plan.Type",
on: { click: () => this.copy(params.row.id) },
}, },
{ {
key: "title", key: "title",
...@@ -175,22 +156,20 @@ export default { ...@@ -175,22 +156,20 @@ export default {
high: true, high: true,
}, },
{ {
attrs: { icon: "md-create", key: "status",
type: "icon", title: this.l("status"),
title: "编辑",
oprate: "edit", },
on: { click: () => this.edit(params.row.id) },
}
),
h(
"op",
{
key: "endDate",
title: this.l("endDate"),
align: "left", align: "left",
high: true, high: true,
type: "date" code: "mes.project_plan.Status",
},
{
key: "startDate",
title: this.l("startDate"),
align: "left",
high: true
,type:"date"
}, },
{ key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
// { // {
// key: "attachment", // key: "attachment",
// title: this.l("attachment"), // title: this.l("attachment"),
...@@ -202,7 +181,7 @@ export default { ...@@ -202,7 +181,7 @@ export default {
title: this.l("executor"), title: this.l("executor"),
align: "left", align: "left",
high: true, high: true,
type: "users", type:"users",
}, },
], ],
}; };
...@@ -211,10 +190,7 @@ export default { ...@@ -211,10 +190,7 @@ export default {
console.log(this); console.log(this);
this.search(); this.search();
}, },
async fetch({ async fetch({ store, params }) {
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -227,9 +203,9 @@ export default { ...@@ -227,9 +203,9 @@ export default {
// this.$refs.grid.reload(this.easySearch); // this.$refs.grid.reload(this.easySearch);
var params = { var params = {
conditions: [{ conditions: [{
fieldName: "projectId", fieldName:"projectId",
conditionalType: 'Equal', conditionalType: 'Equal',
fieldValue: this.eid fieldValue:this.eid
}], }],
// conditions: [] // conditions: []
}; };
...@@ -247,7 +223,7 @@ export default { ...@@ -247,7 +223,7 @@ export default {
"upId" "upId"
); );
this.list = data; this.list =data;
}); });
}, },
...@@ -259,13 +235,13 @@ export default { ...@@ -259,13 +235,13 @@ export default {
// } // }
// }, // },
add(row) { add(row) {
if (row) { if(row){
this.curId = row.id; this.curId=row.id;
this.row = row this.row=row
} else { }else{
this.curId = null; this.curId=null;
this.row = { this.row={
projectId: this.data.id, projectId:this.data.id
} }
} }
...@@ -310,6 +286,5 @@ export default { ...@@ -310,6 +286,5 @@ export default {
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -18,26 +18,38 @@ ...@@ -18,26 +18,38 @@
</div> </div>
<ul> <ul>
<li> <li>
<a @click="details"> <Icon type="ios-log-in" />详情 </a> <a @click="details">
<Icon type="ios-log-in" />详情
</a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="template"> <Icon type="ios-photos" />模版</a> <a @click="template">
<Icon type="ios-photos" />模版
</a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="md-create" />任务 </a> <a @click="task">
<Icon type="md-create" />任务
</a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="group"> <Icon type="md-create" />成员 </a> <a @click="groupUser">
<Icon type="md-create" />成员
</a>
&nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="md-create" />动态 </a> <a @click="task">
<Icon type="md-create" />动态
</a>
&nbsp;
<span>|</span> <span>|</span>
</li> </li>
</ul> </ul>
...@@ -91,15 +103,46 @@ export default { ...@@ -91,15 +103,46 @@ export default {
} }
this.detail = () => import("./details"); this.detail = () => import("./details");
}, },
group() { methods: {
load(v) {
Api.get({
id: v
}).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
},
details() {
this.title = "详细信息";
this.detail = () => import("./details");
},
template() {
// this.curId = this.eid; // this.curId = this.eid;
this.title = "成员管理"; this.title = "项目模板";
this.detail = () => import("../groupUser/index1"); this.detail = () => import("../plan");
},
task() {
this.curId = this.eid;
this.title = "任务";
//this.detail = () => import("../task/index");
this.$router.push({
name: "project-task",
params: {
id: this.curId
}
});
},
groupUser() {
// this.curId = this.eid;
this.title = "任务";
// this.detail = () => import("./add");
}, },
l(key) { l(key) {
key = "project_main" + "." + key; key = "project_main" + "." + key;
return this.$t(key); return this.$t(key);
}, },
},
watch: { watch: {
eid(v) { eid(v) {
if (v > 0) { if (v > 0) {
......
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